On Sun, Nov 07, 2004 at 05:54:59PM -0500, Dave Aitel wrote: > I seriously recommend doing all your thread work in your main thread, > and then having that thread clear a queue of events. Then you fill the > queue with your other threads. It sounds complex, but it's really the > simplest way in the long run.
The problem is that in some applications it is very natural for the main thread to add elements to the queue. Which means that if you work with a queue limited in size deadlocks can occur. Working with an unlimited queue can result in queus that grow without bounds. I agree that queue like behaviour is the way to handle these kind of things but my feeling is that python queues are a bit too simple to be used in general although they can be enough in (most) specific cases. It also may depend on whether you are satisfied with a polling solution on your queue or want the main thread only to examine the queue when it is not empty. -- Antoon Pardon _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
