Philippe A. Bouchard said: > > "William E. Kempf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > [...] > >> You may not need to. It wholly depends on context. The key is that >> atomic increments need not (portability issue) insure memory >> visibility. If what you do next doesn't rely on the visibility of any >> memory, you won't need a full lock. >> >> The other issue is how you know the increment is atomic? > > You mean that there is no way to increment the counter and copy its > value atomically...?
Not portably, no. Something that Boost.Threads may help with in the future (something along the lines of Alexander's pthread_refcount_t). William E. Kempf [EMAIL PROTECTED] _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost