On Wed, 22 Dec 2004 08:27:48 +0100, Kosta
Hi!
I have the following questions about boost.thread:
1) Did I miss an abstraction about atomic operations, e.g. for ++, --, +=, -=, <, ==, =, ... for uint8_t, uint16_t, uint32_t, ... (something like InterlockedIncrement() on WIN32)? I know that I can Mutexes and Locks to implement the desired behavior, but I think a more lightweight solution for this basic operations should be available, too.
See
2) How can I change the priority of a boost::thread?
There is no way to do this with Boost.Threads currently.
3) boost::shared_ptr<> and boost::weak_ptr<> are not thread safe, are they? What is the suggested way to write thread safe implementations of them?
Yes they are. They use the boost::detail::atomic_count under the covers. -- Caleb Epstein caleb dot epstein at gmail dot com