Am Donnerstag, den 26.01.2006, 13:07 +0100 schrieb Valentino Volonghi aka Dialtone: > On Thu, Jan 26, 2006 at 11:20:07AM +0100, Andreas Kostyrka wrote: > > How do you integrate it with Twisted? *curious* > > It's written in the other message :). Anyway I use > > twisted.internet.threads.deferToThread() > > with extra code to handle the transaction.
Any chance to see this extra code to handle transactions or at least pseudo code? I haven't yet tried, but I think the following should work: deferToThread create a Thread context in the Uow engine fetch all objects. main thread: restore the Thread context for the uow engine and work with the objects deferToThread restore the Thread context for the uow engine objectstore.commit() I just wondered what manipulation are needed for the uow engine to catch all transaction modification cleanly. The docs for the uow engine are still missing, but I cleamed from other chapters that the uow engine captures this in thread local storage. OTOH, perhaps I missunderstood the docs. Andreas
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

