Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2002-10-18 12:27:20

David Abrahams wrote:
> * "Thread-safe": this is a term which is well-defined for programs. It
> is /not/ well-defined for classes or functions, though the
> documentation uses it that way repeatedly. ....

"Reentrant Function

 A function whose effect, when called by two or more threads,
 is guaranteed to be as if the threads each executed the function
 one after another in an undefined order, even if the actual
 execution is interleaved."


 A function that may be safely invoked concurrently by multiple
 threads. Each function defined in the System Interfaces volume
 of IEEE Std 1003.1-2001 is thread-safe unless explicitly stated
 otherwise. Examples are any "pure" function, a function which
 holds a mutex locked while it is accessing static storage, or
 objects shared among threads."

"Async-Cancel-Safe Function

 A function that may be safely invoked by an application while
 the asynchronous form of cancelation is enabled. No function
 is async-cancel-safe unless explicitly described as such."



Boost list run by bdawes at, gregod at, cpdaniel at, john at