paludis  Version 1.4.2
Public Member Functions | List of all members
paludis::Lock Class Reference

#include <mutex.hh>

Public Member Functions

void acquire_then_release_old (Mutex &)

Basic operations

 Lock (Mutex &)
 ~Lock ()

Detailed Description

A RAII lock for a Mutex.

If threading is disabled, locking is a no-op.


Member Function Documentation

void paludis::Lock::acquire_then_release_old ( Mutex )

Acquire a lock on the provided Mutex, and then release our previously owned lock.

Use with caution – this is a good way of creating deadlocks.

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