W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2001

Re: Using 'regular' threads on win32.

From: Attila Uhljar <attila.uhljar@intervoice-brite.com>
Date: Wed, 09 May 2001 09:30:10 -0500
Message-Id: <saf90e20.097@172.16.16.64>
To: <mach82@mach8.nl>, <www-lib@w3.org>
Hi Lucas,

The answer is: it depends. :) Libwww is not MT-safe in any way. As long as you use libwww itself from just one dedicated thread it is ok. Libwww is capable of performing multiple transactions in a concurrent manner w/o launching multiple threads. To do that one of your threads has to enter the Libwww 'event loop' and that will take care of the rest. You can use as many other threads in your app as you want, as long as they don't call libwww APIs.

If you want to have multiple threads calling Libwww functions, you are out of luck. By default, that is. I guess it is possible to put mutexes around global variable accesses and things like that in Libwww, but I doubt it's worth the effort, since you will loose performance (and probably it's a big task anyway).

Hope this helps,

Attila
Received on Wednesday, 9 May 2001 10:32:15 GMT

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