SMP, GIL and Threads

2005-12-16 Thread catsup
Hi, I have an app written under version Python 2.3.5. The problem I'm having is that it hangs on one of its threads. The thread that hangs does updates to a standard dictionary shared with another thread that only reads this dictionary. This app works beautifully on a single processor boxes in

Re: SMP, GIL and Threads

2005-12-16 Thread catsup
Yes. Iterating over a list that you concurrently update will definately cause problems. That is not the type of "read" I am doing in the application. My read is one key/value translation. Below is an example of the operations I am performing to help clarify. The update thread, running once eve

Re: SMP, GIL and Threads

2005-12-16 Thread catsup
Yes. The test for Empty was edited out. There is a great deal going on in this application, most not germane to the problem. I should perhaps let all of you be the judge of that. Hopefully, this will be enough to help generate ideas. Thanks, Randy -- http://mail.python.org/mailman/listinfo/p

Re: SMP, GIL and Threads

2005-12-17 Thread catsup
It was actually quite a minor adjustment in the application to follow the oft repeated advice here on this subject to share only the Queue object between threads. Making the update of the dictionary just another queued command request caused both the dictionary read and write to be performed by th