Naming (general-purpose) thread-safe data structures?

I am looking for a good name to create data structures that are thread safe / internally synchronized.

The C ++ standard uses the term atomic , but atomic has a rather special meaning . Microsoft uses the term Concurrent in its collections with thread support (or in C ++ _concurrent in Parallel containers ).

I would like it to be a generic wrapper for types (values), which provides a similar set of operations for what std :: atomics does, but with a different name and some typedefs derived from it. (usage example: something like std :: atomic for std :: string )

Which of the following do you find useful / not useful and why?

  • SynchronizedThingamajig (or thingamajig_synchronized or synchronized_thingamajig )
  • Concurrent...
  • ThreadSafe...
  • Safe...
  • Parallel...
  • Locked...
  • Mutex ... or Mutexed...
  • Multithreaded...

For the example line that I gave, maybe synchronized_string or concurrent_string would make the most sense, or would it come across any other connotation?

+6
source share
2 answers

Useful answer from the comment:

Both Microsoft PPL and Intel TBB use concurrent_* . Just my suggestion: Do not use parallel when you mean simultaneous. (Parallel is a form of concurrency, but these data structures should even work on the same processor with temporary multiplexing of multiple threads.) You can also view the monitor pattern.

- Wandering logic June 18 at 12:02

To which I can add that of the options that I gave, thinking more about it, it seems that only concurrent and synchronized make sense.

+5
source

I think you should try this name:

Safecontainer

0
source

Source: https://habr.com/ru/post/947538/


All Articles