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);
|
return ScopedLock!T(object);
|
||||||
}
|
}
|
||||||
/// ditto
|
/// 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 {
|
nothrow {
|
||||||
auto l = lock(object);
|
auto l = lock(object);
|
||||||
accessor(l.unsafeGet());
|
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 {
|
unittest {
|
||||||
|
|
Loading…
Reference in a new issue