On 24 Apr, 11:45 pm, clayton.da...@gmail.com wrote:
I have a modular application that communicates over RPC connections
(with
both sync and async server/clients available). I want to migrate some
of
the modules over to Twisted. Currently, all modules inherit important
utility functions from a
[apologize in advance if this creates threading issues as I picked digests
when I signed up not realizing it would make it difficult to reply to
threads]
Sorry I wasn't more clear. My thought is to write a version that uses the
same @inlineCallback name and supports the same syntax (to eliminate
Le 2014-04-25 01:45, Clayton Daley a écrit :
I imagine rewriting this to the following:
@classmethod
@inlineCallbacks
def from_id(cls, id):
doc = yield db.get_document(id) # blocking/async db call
self = cls._new_document(doc) # always synchronous
yield self
I have a modular application that communicates over RPC connections (with
both sync and async server/clients available). I want to migrate some of
the modules over to Twisted. Currently, all modules inherit important
utility functions from a parent class. On paper, I now need two versions
of this