You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
The Tornado server implemented by thriftpy is asynchronous(using tornado.tcpserver.TCPServer). You can define methods with @gen.coroutine decorator or methods returning Future object.
class Dispatcher(object):
@gen.coroutine
def ping(self):
yield gen.sleep(10)
raise gen.Return("pong")
Yes, you are definetly right. I tried it before, but the problem was that I was trying to send lots of calls in parallel, but from the same client (which isn't async), so I couldn't be able to get benefit from async server side code.
I am trying to run the example in the docs (in
tornado.py
):This isn't asynchronous Tornado code (since there is no
@coroutine
decorator in theDispatcher
class, and it actuallty returns as any simple function).Can be thriftpy's Tornado server asynchronous in any way?
The text was updated successfully, but these errors were encountered: