W3C home > Mailing lists > Public > www-lib@w3.org > October to December 2005

Re: Multithreading libwww

From: Vic Bancroft <bancroft@america.net>
Date: Thu, 17 Nov 2005 07:12:22 -0500
Message-ID: <437C73A6.4020507@america.net>
To: Annesley Newholm <annesley.newholm@wpsit.net>
CC: www-lib@w3.org

Annesley Newholm wrote:

>I'm new to libwww. I'm trying to write a multi-threaded robot using libwww.
>I have used the -enable-reentrant option in the compile but I think the
>event loop is in some way global and causing the system to crash. 
>
Yes, it would certainly take more than a compile switch to make the code 
reentrant. 

>Would it be better instead to kick off the robots as processes instead of
>threads?
>  
>
Yes, a multiprocess model might be more natural.

>If I understand correctly I can use non-blocking sockets and pipelining to
>hold multiple conversations through sockets from many threads. 
>
It is possible, since the library can support multiple concurrent 
requests and will make the appropriate function callbacks.  I have used 
the library in a multithreaded context and found a queueing approach 
most helpful. 

more,
l8r,
v


>Is what I'm
>trying to do conceptually possible (i.e. shall I write the socks
>communication myself)?
>
> 
>
>Annesley
>
>
>  
>


-- 
"The future is here. It's just not evenly distributed yet."
 -- William Gibson, quoted by Whitfield Diffie
Received on Thursday, 17 November 2005 12:12:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:45 GMT