diff --git a/source/vibe/core/concurrency.d b/source/vibe/core/concurrency.d index 657a511..baee1c0 100644 --- a/source/vibe/core/concurrency.d +++ b/source/vibe/core/concurrency.d @@ -37,11 +37,17 @@ pure nothrow @safe { return ScopedLock!T(object); } /// ditto -void lock(T : const(Object))(shared(T) object, scope void delegate(scope T) accessor) +void lock(T : const(Object))(shared(T) object, scope void delegate(scope T) nothrow accessor) nothrow { auto l = lock(object); accessor(l.unsafeGet()); } +/// ditto +void lock(T : const(Object))(shared(T) object, scope void delegate(scope T) accessor) +{ + auto l = lock(object); + accessor(l.unsafeGet()); +} /// unittest {