Experiment ThreadsInPython

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 1. about 3 years by veraltb
 

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