(no subject)

Wesley Chun wesc at deirdre.org
Wed Jul 11 04:50:39 EDT 2001


Bill Bell wrote:

> Xia Ziao-Qin wrote:
>> Hi, everybody, is there any detailed tutor for python multi-thread
>> programming?
>
> Some places to read about Python threads:
> http://starship.python.net/crew/aahz/IPC9/index.html chapter in Wesley
> Chun's "core Python" book (available via
> http://starship.python.net/crew/wesc/cpp/book/) articles in the help
> file for wxPython (http://www.wxpython.org)
>
> Enjoy.


Specifically for Core Python Programming, Chapter 17 is
devoted completely to multithreaded programming in Python.

There is an introduction/motivation section first, followed
by a "process vs. threads" discussion, then talk about what
Python's thread model is, and then we go into a deep discus-
sion on how to use threads properly in Python.

Throughout the chapter, we use one simple example and expand
on it as our knowledge of Python threading grows.  The basics
are covered with the 'thread' module first, then we explain
why this isn't as useful or safe as the higher-level thread
support provided by the 'threading' module.  After showing
you the 3 basic ways to create threads using the
threading.Thread class, we conclude the chapter with a more
complex example using the 'Queue' module.

The link above just leads you to the chapter's code samples.

Hope this helps!

-wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Silicon Valley-SF Bay Area Python users group:  http://baypiggies.org

"Core Python Programming", Prentice Hall PTR, December 2000
    http://starship.python.net/crew/wesc/cpp/

wesley.j.chun :: wesc at baypiggies.org
cyberweb.consulting :: silicon.valley, ca
http://www.roadkill.com/~wesc/cyberweb/





More information about the Python-list mailing list