Welcome to mirror list, hosted at ThFree Co, Russian Federation.

AUD_MutexLock.h « intern « audaspace « intern - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b6f6d2b43342cb95cd2b8bbfc79e5dfdec7a6484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef AUD_MUTEXLOCK_H
#define AUD_MUTEXLOCK_H

#include "AUD_ILockable.h"

class AUD_MutexLock
{
public:
	inline AUD_MutexLock(AUD_ILockable& lockable) :
		lockable(lockable)
	{
		lockable.lock();
	}

	inline ~AUD_MutexLock()
	{
		lockable.unlock();
	}

private:
	AUD_ILockable& lockable;
};

#endif // AUD_MUTEXLOCK_H