W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2001

Beginner problems with libwww and posix threads.

From: Naveen <naveen@auvo.com>
Date: Thu, 1 Feb 2001 11:48:40 -0600
To: <www-lib@w3.org>
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?
   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

Thanks in advance,

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:53 UTC