Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : How sequence treads for a TIdHttp web spider?

www.cryer.info
Managed Newsgroup Archive

How sequence treads for a TIdHttp web spider?

Subject:How sequence treads for a TIdHttp web spider?
Posted by:"Pete Mosser" (pmoss..@atgroup.com)
Date:Mon, 28 Apr 2008 14:24:02

How can I best manage and sequence the repeated firing of threads for a web
spider that uses TIdHttp objects? I have looked at this problem from several
angles and still haven't got a mental grasp of it.

I have 12 threads with TIdHttp objects and I'm using a TDataSet in the main
thread to hold the parsed href URLs from the html returned from within a
Synchronize routine on each thread. I also have a TQueueList to hold
pointers to the available threads that aren't currently busy downloading.

My problem is the restarting the TThreads after the available threads or
URLs have been temporarily exhausted. What can I use to signal the main
thread to pop a thread from the queue when a thread or a URL again becomes
available?

Replies:

www.cryer.info
Managed Newsgroup Archive