W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2003

RE: multi-threads using libwww

From: Fred Covely <fcovely@bcftech.com>
Date: Mon, 8 Sep 2003 22:21:43 -0700
To: "Jerry G. Chiuan" <jerry@oridus.com>, <www-lib@w3.org>
Message-ID: <ACEKLGNKPGDIJAAOLOFCMEGBELAA.fcovely@bcftech.com>
I use libwww on windows. The 'main' libwww thread can used in an entirely
message driven fashion.  So there is a queue that it pulls from but at the
it uses the normal libwww event loop to pull stuff from the queue.  Using
this kind of approach you can have any number of client threads running
while having the main message loop thread service both the internal libwww
messages as well as the queue in a way that is entirely non-blocking.

Hope that helps.
  -----Original Message-----
  From: www-lib-request@w3.org [mailto:www-lib-request@w3.org]On Behalf Of
Jerry G. Chiuan
  Sent: Monday, September 08, 2003 10:12 PM
  To: www-lib@w3.org
  Subject: multi-threads using libwww

  Hi All,
  I have seen a lot of discussion regarding multi-threads using libwww

  As I know, we can NOT have multi-threads which "directly" invoke libwww
function calls to send requests simultaneously
  what we only can do is all threads can put their requests to a quene, and
there is another "single" thread which ends up taking care of sending all of

  However, in my application I have 2 threads, one of them would send
request to server and server would hold the request, I mean the sever will
not respond instantly until there are really something which needs to be
returned back to the client.
  Therefore, single thread MUST not be enough in my case. I definitely need
2nd thread which can do other things while 1st thread is blocked

  If libwww, as everyone mentions here, actually only has ONE thread
internally to handle request sending. I think I need to use other library

  Please correct my ideas and provide some suggestions

  thanks a lot
  - Jerry
Received on Tuesday, 9 September 2003 01:20:37 UTC

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