conditionvariableany
condition_variable_any is a synchronization primitive in the C++ standard library that enables threads to wait for a condition using any type of lock that models the Lockable concept. It is defined in the header <condition_variable> and is part of the same family as std::condition_variable, but it offers greater flexibility.
The class itself is not templated on a specific lock type. Instead, its member functions are templates
Semantics and usage: wait(lock) releases the provided lock, blocks the calling thread until another thread notifies
Comparison: std::condition_variable requires a specific locking form, typically std::unique_lock<std::mutex>, while condition_variable_any works with any Lock type
In practice, condition_variable_any is used to coordinate producer-consumer scenarios or other inter-thread communication where the protected