> So my question: is there any way to attach a client connection to > another thread immediately, from the main thread?
Probably, but I've said I've not done it myself, no need. Others may have done so, but I don't believe it necessary for your application. > The problem is really that my worker threads are not available at > the time the client socket needs to be attached to one of those, > and waiting for a worker thread to be available would block the > main thread. That is what Windows messages and events are for. Look at the sample OverbyteIcsWebAppServerMailer.pas which is probably pretty much what you are doing, accepting data from the client, doing something and giving a response. The Execute method for the page triggers a DNS lookup with the completed event creating the response page. If the page has been POSTed, it then starts to send an email using the SMTP component with more events, and a timer runs to make sure a response gets sent within a few seconds. So you send a message to your job queue system, which runs your worker thread, when it's finished it sends a message back and the response completes. All communications completes in the main thread. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be