Make yieldLock() safe and nothrow.

This commit is contained in:
Sönke Ludwig 2019-01-22 10:46:35 +01:00
parent bee1c626cc
commit 1a87ee5b3f

View file

@ -1118,8 +1118,10 @@ struct TimerCallbackHandler {
Multiple yield locks can appear in nested scopes.
*/
auto yieldLock()
{
@safe nothrow {
static struct YieldLock {
@safe nothrow:
private this(bool) { inc(); }
@disable this();
@disable this(this);