Re: [Twisted-Python] Synchronous @inlineCallback interpreter

2014-04-24 Thread exarkun
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

Re: [Twisted-Python] Synchronous @inlineCallback interpreter

2014-04-24 Thread Clayton Daley
[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

Re: [Twisted-Python] Synchronous @inlineCallback interpreter

2014-04-24 Thread pierre
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

[Twisted-Python] Synchronous @inlineCallback interpreter

2014-04-24 Thread Clayton Daley
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