From 7d7e4709c14147235f19f45a82b6b931453c8db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Thu, 15 Jun 2017 13:45:14 +0200 Subject: [PATCH] Fix nothrow overloads of lock(). --- source/vibe/core/concurrency.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 {