[email protected]
[Top] [All Lists]


Subject: Re: New LDAP C API
From: David Boreham
Date: Tue, 13 Feb 2007 17:10:42 -0700
Love Hörnquist Åstrand wrote:

This was one of Kurt's points, but I take it to mean "free- threaded" i.e. the same library should work with or without threads. The calling app should provide threading/locking callbacks if needed.

For me free-threaded means no locking done at all, because its not needed.

It doesn't mean that to me. It means that there are no
unreasonable constraints imposed on the application related
to concurrency -- here's your handle, go use it freely -- no
'oh well, you can't use that handle in a different thread' or
'oops, no you can't read from it in one thread while writing
in another thread' etc etc. The application doesn't need to
worry about tripping over concurrency hazards inside the
library, modulo stupid things like closing a handle in one thread
while still inside a call on the same handle in another thread.
OS handles (fds etc) usually work like this.

I'm not sure about the current OL library, but I do know that
the Mozilla SDK has some evil concurrency issues because when
I wrote some code in the server that accessed the same handle
from two threads all hell broke loose. I had to introduce some
unpleasant work arounds in my code.

<Prev in Thread] Current Thread [Next in Thread>