[pygtk] idle_add vs. threads_enter/threads_leave
Jason Heeris
jason.heeris at gmail.com
Mon Jul 5 18:18:11 WST 2010
On 5 July 2010 18:05, Neil Benn <neil.benn at ziath.com> wrote:
> I persevered however and threads work fine in Python - OK the GIL can make
> things a little more complicated but threading in Python is not much harder
> to use then in Java or C# (in fact because of the GIL and single processor I
> don't have to worry about volatile variables).
Incidentally, typically I'll use Python's multiprocessing module, or
the Python-DBUS bindings (particulary the asynchronous features of
DBUS) if there's some really intensive work to be done. So it might be
worth a look for you too. Keep in mind, though, DBUS is emphatically
NOT optimised for throughput - it's not a good idea for pushing around
a lot of data (instead of, say, reading a lot of data and passing back
a summary). This is (presumably) where Twisted shines, because of its
origins as a networking framework.
- Jason
More information about the pygtk
mailing list