vibe.d beta banner
get vibe.d
0.7.31

Struct ScopedMutexLock

RAII lock for the Mutex class.

struct ScopedMutexLock;

Constructors

Constructors

NameDescription
this

Properties

Properties

NameTypeDescription
locked[get]bool

Methods

Methods

NameDescription
lock
tryLock
unlock

Example

int protected_var = 0;
auto mtx = new TaskMutex;
mtx.performLocked!({
	protected_var++;
});
Authors

Leonid Kramer, Sönke Ludwig, Manuel Frischknecht

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.