I'm looking for a naming convention for thread safe functions, meaning functions that can be called safely from multiple threads. But suppose I use :
void FooThreadSafe();
In your mind, do you think that :
This function will use locking mechanism and is safe to call concurrently ?
Or
This function can be called ONLY in a thread safe context ?
To me it's the first option, but many people think it's the second option. So I'm looking for a way to make it clear that you don't have to lock to call the function. Any idea ?
Thanks,
Noisetier
Java uses Atomic
or Concurrent
as prefix.
For example AtomicReference<>
, ConcurrentHashMap<>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With