Threading, real or simulated?

S

Sam

I'm using Python 2.3.5 with pygtk 2.4.1, and I'm using the second threading
approach from pygtk's FAQ 20.6 - invoking "gtk.gdk.threads_init()", and
wrapping all gtk/gdk function calls with
gtk.threads_enter()/gtk.threads_leave()

I start a thread, via thread.Threading.start(). The thread then calls a
particularly time consuming C function, from an extension module. I find
that when the thread is running the C code, the GUI hangs even though I'm
not inside the threads_enter/threads_leave territory.

It looks like thread.Threading() only simulates threading, by having the
python interpreter multiplex between running threads. Is real threading
possible, so that I do something time-consuming in the thread, without
hanging the GUI?



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQBDMet3x9p3GYHlUOIRAgSDAJ9E4zB95NqllaX/yqkBjIuvqngyBACdFGUR
aD7zKkA9Sb3aTHjNMJZgQZA=
=CcvF
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top