vibe.d beta banner
get vibe.d
0.7.30

Struct ScopedMutexLock

RAII lock for the Mutex class.

Constructors

Name Description
this

Properties

Name Type Description
locked [get] bool

Methods

Name Description
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.