Beginner problems with libwww and posix threads.

I am having the same below problem. Is it that libwww is not thread safe
(well its mentioned in the documentation that it is not). Is there any way
to replace psuedo-threads with actual O/S threads. How much effort is it
needed to rewrite this? Can some body help?
Hi,
   I'm having problems using real posix threads with libwww. The
learning curve for the library is very steep, and so I didn't want to
get into libwww pseudo threads and the like since I only want to do
something extremely simple.

Basically I want to set up the library in a standard way, then retrieve
two or more URL texts to chunks in parallel. I did this by calling a
standard client setup, then sparking off two posix threads, each of
which creates a new request and calls loadtochunk, or whatever. The main
program then busy waits for whichever to complete first and displays.

According to (my interpretation) of what documentation there was on
(real) threading, this should be threadsafe. Have I completely
misunderstood? Because what happens is the program just randomly
segments or fails on one or both URLs. My 'code' is not at fault, though
of course I am probably abusing the library. Can anyone help out, what's
the quickest and easiest way to do this?

I'm using Red Hat Linux, and LibWWW 5.1b and compiled enabling reentrant
code.

Thanks in advance,

Keith.

Received on Thursday, 1 February 2001 12:46:40 UTC