On 03:24 am, [email protected] wrote: >Hi all, > >Our projects at work include synchronous applications (short lived) >and asynchronous Twisted applications (long lived). We're re-factoring >our database and are going to build an API module to decouple all of >the SQL in that module. I'd like to create that API so both >synchronous and asynchronous applications can use it. For the >synchronous applications I'd like calls to the database API to just >return data (blocking) just like using MySQLdb, but for the >asynchronous applications I'd like calls to the same API >functions/methods to be non-blocking, probably returning a deferred. >Anyone have any hints, suggestions or help they might offer me to do >this?
Chris Armstrong wrote a synchronous implementation of Deferred. That might be an approach to investigate: http://radix.twistedmatrix.com/2007/12/supporting-both-asynchronous- and.html Jean-Paul _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
