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

Multithreaded application and libwww

From: Marc Necker <rusmarc@infotst2.rus.uni-stuttgart.de>
Date: Thu, 18 Nov 1999 06:34:52 -0500 (EST)
Message-Id: <199911181134.LAA08667@infotst2.rus.uni-stuttgart.de>
To: www-lib@w3.org
Hello!

I have a problem using libwww with my multithreaded application.
Unfortunately I did not find any information on libwww working or not
working in multithreaded applications.

The problem is this:
I initialize libwww using the newPreemptiveRobot-Profile. Then I start one
or more threads which issue requests using HTLoadAnchorToChunk. Everything
works fine as long as only one thread accesses libwww at a time. However, as
soon as two or more threads call HTLoadAnchorToChunk at the same time this
function appears to not being preemtive anymore.

My program uses some after-Handlers which set the variable (this->httpstatus)
to the return code of the request. A busy-wait like
chunk=HTLoadAnchorToChunk(anchor,request); while (this->httpstatus==0) {};
works fine. HTLoadAnchorToChunk appears to return immediately with more than
1 thread launched.

I hope somebody can help me. Thanks.


Marc

-- RUS   : Necker@rus.uni-stuttgart.de
Received on Thursday, 18 November 1999 14:45:22 GMT

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