write_lock - Melnytskyi/fast_task GitHub Wiki
Declaration
class write_lock {
task_rw_mutex& mutex;
public:
write_lock(task_rw_mutex& mutex)
: mutex(mutex) {
mutex.write_lock();
}
~write_lock() {
mutex.write_unlock();
}
};
This class implements the RAIL write lock/unlock for task_rw_mutex.
Usage
fast_task::task_rw_mutex mutex; //... { fast_task::write_lock lock(mutex); //... }