Stiffstream / sobjectizer

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.
https://stiffstream.com/en/products/sobjectizer.html
Other
481 stars 47 forks source link

Add lock_shared/unlock_shared to so_5::null_mutex_t #84

Closed eao197 closed 1 day ago

eao197 commented 2 months ago

There is so_5::null_mutex_t thas has empty (no-op) methods lock and unlock. It can be used for a case when actual locking is not needed (for example, in single threaded environments).

It may be useful to have also empty (no-op) methods lock_shared and unlock_shared. It that case so_5::null_mutex_t can be used instead of std::shared_mutex when actual locking is not needed.