[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Is Netscape SDK thread safe?

Lingjia Yang wrote:
> Does anyone know that whether Netscape SDK is thread
> safe?  We need to develope a multi-thread client to
> connect to OpenLDAP server.

It is not thread reentrant, and it does not marshall
data between threads.

It can be used in a threaded application, but only if
you forward all requests to the thread that did the
original connection establishment.

The major problem is that connection state information
and sockets are not marshalled based on receiving a
"thread attach" on the DLL.  More minor is protection
of data objects, and distribution of responses from
the server to the thread that made the request.

It's pretty trivial to modify it to be freethreading
safe, but people who can do that apparently don't use
Windows, so its not a problem for them.

Most of the people who need it could probably do it
as well, but appear to be required to use it "as is".

-- Terry Lambert
-- Whistle Communications, Inc., an I.B.M. Company
-- terry@whistle.com
This is formal notice under California Assembly Bill 1629, enacted
9/26/98 that any UCE sent to my email address will be billed $50
per incident to the legally allowed maximum of $25,000.