newbie - threading

martijn_at_gamecreators.nl
Date: 03/30/05


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



Relevant Pages

  • Re: Details on delivering and managing application
    ... On Thu, 03 Feb 2005 15:47:29 GMT, Wade Humeniuk ... >> It seems some peaple forget how expensive spawning new proceses is ... Under windows process overhead is much higher so if you want to ... The newer Apache 2 uses a threading pool and is much faster. ...
    (comp.lang.lisp)
  • Re: apple mail as a usenet reader?
    ... handling of threading- for example, if you set it for threading ... e-mails it opens each e-mail in a separate window simultaneously. ... own windows rather than viewing them in the message pane below the ...
    (comp.sys.mac.system)
  • Re: user interface fails under UNIX (but works with Windows!)
    ... > A program I am writing, called TimeSleuth and available from ... > same program, however, works when run in Windows. ... Threading is one of the few areas which works ...
    (comp.lang.java.help)
  • Re: Rocket J. Squirrel-- repair registry
    ... I did answer a question about how to reinstall Windows, ... Chkdsk checks your hard disk for logical errors (misconfigurations of the ... file system) and for physical problems on the surface of your hard disk. ... Threading is easy to do: Just use the reply function of your newsreader and ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Can Somebody please explain
    ... Near the bottom it's got some bits about Windows Forms and threading. ... you're receiving callbacks then you'll run into problems displaying stuff - ... I am not able to display any of the messages on ...
    (microsoft.public.dotnet.general)