Fix nothrow overloads of lock().
This commit is contained in:
parent
0d164708ec
commit
7d7e4709c1
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue