Version 1, last updated by veraltb at Apr 26 17:11 2009 UTC

I created this demo to help my understanding of threads in Python. It is functions exactly like my homework assignment I wrote last night in CSE 451 (except that was in C). The good news is that if you understand pthreads, you'll understand this.

Get it here!

I got all the necessary info out of my copy of Python in a Nutshell by O'Reilly.

Some tips:

  • Use threading module, not thread module. threading is built upon thread, but makes threading more usable.
  • Signaling using a condition requires ownership of a lock in Python, which is the opposite of C. (Still chewing on that one...)

I'll get more details regarding threads in Python up here shortly... as experiments continue!

-- Travis