Question about thread
russblau at hotmail.com
Fri Nov 19 16:38:43 CET 2004
"Valkyrie" <valkyrie at cuhk.edu.hk> wrote in message
news:1100875373.911763 at eng-ser6...
> Refering to the following codes I found, there is nothing displayed in the
> console, may I ask why?
> def thrd(param): # the thread worker function
> print "Received",param
> import thread
> for i in range(5): # start five threads passing i to each one
You may ask, but when I tried your code, here is what happened:
Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> def thrd(param): # the thread worker function
... print "Received",param
>>> import thread
>>> for i in range(5): # start five threads passing i to each one
>>> Received 0
Note that the numbers 1960, etc., appear to be the return values of the
I don't actually read my hotmail account, but you can replace hotmail with
excite if you really want to reach me.
More information about the Python-list