Re: Multithreading libwww

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 UTC