Locking - Threading

When using threads, it's important to lock shared resources so that multiple threads do not attempt to access the resource at the same time. Some classes that include locking functions:

These classes implment these functions:

bool try_lock();

void lock();

void unlock();

They can also be with WITH_LOCK().