Re: use threading without classes
- From: "Harlin Seritt" <harlinseritt@xxxxxxxxx>
- Date: 31 Aug 2005 04:04:29 -0700
Is there any reason why you wouldn't want to do this using the the
threading class? To each his own I suppose. You can try the following
though you'll at least need to use functions:
import time
import thread
def myfunction(string,sleeptime,*args):
while 1:
print string
time.sleep(sleeptime) #sleep for a specified amount of time.
if __name__=="__main__":
thread.start_new_thread(myfunction,("Thread No:1",2))
while 1:pass
.
- References:
- use threading without classes
- From: billiejoex
- use threading without classes
- Prev by Date: strange behaviour of str()
- Next by Date: Re: Yielding a chain of values
- Previous by thread: use threading without classes
- Next by thread: Re: use threading without classes
- Index(es):
Relevant Pages
|