Multithreaded application and libwww

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 UTC