newbie - threading
martijn_at_gamecreators.nl
Date: 03/30/05
- Next message: Amaury Forgeot d'Arc: "Re: Overriding methods in classes you don't control"
- Previous message: Ron Garret: "Re: Weakrefs to classes that derive from str"
- Next in thread: MyHaz: "Re: newbie - threading"
- Reply: MyHaz: "Re: newbie - threading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2005 23:28:51 -0800
H!,
I have made a spider and now I want to use threading so it will be
faster faster and faster :)
But I don't understand threading.
So I try this but I get a error in windows 2000.
-----------
class connector(threading.Thread):
def __init__(self,url):
self.url = url
threading.Thread.__init__(self)
def run(self):
print self.url #and do the things
.
.
.
while result:
thread = connector('http://'+result[0])
thread.start()
threadlist.append(thread)
time.sleep(1)
for thread in threadlist:
thread.join()
-----------
The first 5 url's are oke but then I get a windows 2000 error.
What to do ?
GC-Martijn
- Next message: Amaury Forgeot d'Arc: "Re: Overriding methods in classes you don't control"
- Previous message: Ron Garret: "Re: Weakrefs to classes that derive from str"
- Next in thread: MyHaz: "Re: newbie - threading"
- Reply: MyHaz: "Re: newbie - threading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|