Advice sought: when to use twisted for long-running tasks?

The wx.lib.delayedresult module may be a good in-between: slightly
higher-level than raw calls to wx.CallAfter/etc, but doesn't affect
design to the extent that twisted would. The module works as-is in 2.6
but will only be available (IIRC) in 2.7. If you want to find out more,

- get wxWidgets\wxPython\demo\DelayedResult.py from the source distrib
and copy to your current wxpython demo dir
- get wxWidgets\wxPython\wx\lib\delayedresult.py from the source distrib
and copy to your current wxpython lib dir

and you should be able to look at the delayedresult demo from 2.6. I
could also just send it to you directly if that's easier.
Oliver

ยทยทยท

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Don Dwiggins
Sent: October 9, 2006 3:11 PM
To: wxpython-users@lists.wxwidgets.org
Subject: [wxPython-users] Advice sought: when to use twisted
for long-running tasks?

I have a working program that calls a monster DB query, and
I'm at the point of wanting to get it out of the main thread
so I can keep the event loop going. Since most of the work
is being done by the DB server, and there's no good way to
break that into chunks, it doesn't lend itself to wx.Yield.

I've looked at the LongRunningTasks page in the Wiki, and at
some of the discussions on combining Twisted with wxPython.
My question is, in what situations would the use of Twisted
be preferable to just "hand cranking" a solution based on a
separate thread? (Disclosure: I'm only slightly acquainted
with Twisted.)

--
Don Dwiggins
Advanced Publishing Technology

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org