
12 Jan
2005
12 Jan
'05
12:37 a.m.
"Jason Hise" wrote: [snip]
I don't think it is necessary for the library itself to be multi-threaded. I think it just needs to have a hook that allows client code to make it thread safe. The interface for such a hook would be the only thing provided (the default single threaded policy defining all the usable methods and leaving them all blank), and the client could then implement an OS specific thread safety policy and pass it in. A dependency on a whole threading library doesn't seem like a good idea for something that only some clients might want.
Maybe it could have threading policy, defaulting to the same mechanism shared_ptr uses, other options being no-locking and user-locking. /Pavel