vibe.d beta banner
get vibe.d
0.10.0

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.

vibe.core.core.yieldLock yieldLock (
  string file = __FILE__,
  int line = __LINE__
);

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.

Authors

Sönke Ludwig

Copyright

© 2012-2020 Sönke Ludwig

License

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