
30 Nov
2011
30 Nov
'11
11:33 a.m.
Tim Blechmann wrote:
"single_thread_push" might cause some misunderstanding, as people may think that it is about a `single producer', not about a `single-threaded use'. so it is really a "thread_unsafe_push", as incorrect use may corrupt the internal data structure.
so maybe "thread_unsafe_push", "nonblocking_push" and "push"?
if there is resistance for unsafe_push, I propose push_unsynchronized (or unsynchronized_push).
very good idea! unsynchronized is much more expressive than unsafe.
I use "noncompeting" (such ops need neither atomicity nor synchronization; multiple noncompeting immutable ops may run concurrently; it basically expresses "thread-safe as an int"). regards, alexander.