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

Multi-Thread Server

From: mkchen <mkchen@iii.org.tw>
Date: Sat, 02 Dec 2000 20:27:37 +0800
Message-ID: <3A28EAB9.91EE5917@iii.org.tw>
To: www-lib@w3.org
Hello :
    I am a newbie of www-lib. I am asked to survey some lib for http
capability. I've traced some part of www-lib, and found that www-lib
use many "private" global variables. Does this means that if my program
is a multi-thread server, the lib will cause problem?

Let me describe our program in more details. Our program will be
a server, and each time it gets a request, it will create a new thread
to handle the incoming request. Each request will need to do a http post

to other web server. each thread need a blocking with timeout socket
We are thinking of writing a wrapper function so that when we need to
data, we just need to call the function, and when it return, the posting
will be
either finish(with or without error) or timeout. So how could I achieve
I think it is not proper to set the socket blocking because it will be
not able
to return if the remote server doesn't response forever. should the
wrapper function call event_loop? if so, then it is possible that more
than two threads will
call event loop at the same time. could this cause problem? As I guess,
it will
be... Could anybody help me with those problem? thanks in advance...


Received on Thursday, 2 December 1999 07:27:51 UTC

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