|
Boost : |
From: Matthew Hurd (matt_at_[hidden])
Date: 2004-02-07 17:00:21
> On Behalf Of Sean Kelly
> Subject: [boost] Re: future of boost.threads
>
> Kind of unrelated but I thought I'd ask here as the original author of
> this thread lib is among the missing. I'd like to create a basic condvar
> implementation for the (windows version of the) D programming language and
> obviously don't want to have to invent one from scratch. Is there another
> good implementation in the public domain or is the boost version it? And
> if I used the boost implementation as a template, would it be
> necessary and sufficient for me to include the copyright notice? It would
> be a total rewrite, but I'd still consider it a derivative work of
> whatever it was based on.
>
> Sean
Sean,
See no reason why you can't use the boost implementation with
acknowledgement.
The ACE license is pretty close to public domain and it has a condition
variable that has been around for many years:
<quote>
Detailed Description
template<class MUTEX>
class ACE_Condition< MUTEX >
ACE_Condition variable wrapper, which allows threads to block until shared
data changes state.
A condition variable enables threads to atomically block and test the
condition under the protection of a mutual exclu- sion lock (mutex) until
the condition is satisfied. That is, the mutex must have been held by the
thread before calling wait or signal on the condition. If the condition is
false, a thread blocks on a condition variable and atomically releases the
mutex that is waiting for the condition to change. If another thread changes
the condition, it may wake up waiting threads by signaling the associated
condition variable. The waiting threads, upon awakening, reacquire the mutex
and re-evaluate the condition. Note, you can only parameterize
<ACE_Condition> with ACE_Thread_Mutex, ACE_Recursive_Thread_Mutex, or
ACE_Null_Mutex.
</quote>
It is a good idea to be familiar with ACE if you are approaching this. ACE
is an excellent library for concurrency, however its C++ is showing both its
age and many compromises to support an amazing number of platforms.
ACE categories are here:
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/docs/ACE-categories.html
ACE home is:
http://www.cs.wustl.edu/~schmidt/ACE-documentation.html
Regards,
Matt Hurd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk