22 Dec
2004
22 Dec
'04
7:27 a.m.
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. 2) How can I change the priority of a boost::thread? 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? Kosta