vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Function yieldLock

Returns an object that ensures that no task switches happen during its life time.

auto vibe.core.core.yieldLock yieldLock ();

Any attempt to run the event loop or switching to another task will cause an assertion to be thrown within the scope that defines the lifetime of the returned object.

Multiple yield locks can appear in nested scopes.


Sönke Ludwig


© 2012-2017 RejectedSoftware e.K.


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