Beginner question on threads

Teresa Hardy thardy99 at gmail.com
Sun Apr 29 21:50:59 EDT 2007


I have successfully made the threading work on a Window XP machine with quad
processors but now I am trying to pass some variables around and am fighting
with Lock()

I have searched through several different documents and forums, some of
which hint at problems with threading on Windows machines so I thought I
should ask...

Can I get use the .acquire() and .release()?
The thread dies unless I comment out these two commands. But I can't thread
unless I can control

ilock = threading.Lock()

ImgGrabber.ilock.aquire()
self.i_inthreads = ImgGrabber.i_temp
ImgGrabber.i_temp += 1
ImgGrabber.ilock.release()

Other details about what I am using
Python 2.4
modPython
Apache server

Hope that's enough info for somebody to give me a recommendation.

To the other beginners that are listening, here are the references I am
using to get this far...
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf
Python How to Program by Deitel, Deitel, Liperi, and Wiedermann

Thanks,
Teresa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070429/93793234/attachment.html>


More information about the Python-list mailing list