libfilezilla
Public Member Functions | Friends | List of all members
mutex Class Referencefinal

Lean replacement for std::(recursive_)mutex. More...

#include <mutex.hpp>

Public Member Functions

 mutex (bool recursive=true)
 
 mutex (mutex const &)=delete
 
mutexoperator= (mutex const &)=delete
 
void lock ()
 Beware, manual locking isn't exception safe, use scoped_lock.
 
void unlock ()
 Beware, manual locking isn't exception safe, use scoped_lock.
 
bool try_lock ()
 Beware, manual locking isn't exception safe.
 

Friends

class condition
 
class scoped_lock
 

Detailed Description

Lean replacement for std::(recursive_)mutex.

Unfortunately we can't use std::mutex and std::condition_variable as MinGW doesn't implement C++11 threading yet. Even in those variants that at least have mutexes and condition variables, they don't make use of Vista+'s CONDITION_VARIABLE, so it's too slow for our needs.

Note
Once all platforms have C++11 threading implemented in the fastest way possible, this class will be removed.
Examples
events.cpp.

The documentation for this class was generated from the following file: