Hi everybody,
I am trying to migrate Twisted code of my app to Tornado equivalents. In particular, I am experiencing some problems when trying to find equivalents to the following Twisted code:
threads.deferToThread(try_func_call, func_call, *args, **kwargs)
def return_value(value):
defer.returnValue(value)
def function(func_call, *args, **kwards):
try:
result = yield threads.deferToThread(try_func_call, func_call, *args, **kwargs)
except:
print traceback.format_exc()
if isinstance(result, Exception):
raise result
return_value(result)
Could you give a solution ? I don't want to keep Twisted code in my Tornado app.
Thanks in advance.
Best,
Hector