Remove deprecation attribute for the system overload of setTimer.

The approach for now is to keep overloads that receive system delegates and are also marked system in turn. This breaks safety promises in some places within the library, but is an acceptable first step that keeps other possible directions open.
This commit is contained in:
Sönke Ludwig 2017-06-22 09:38:56 +02:00
parent f40da06385
commit fd93ab82f5
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -764,9 +764,8 @@ unittest {
} }
/// Compatibility overload - use a `@safe nothrow` callback instead. /// Compatibility overload - use a `@safe nothrow` callback instead.
deprecated("Use an @safe nothrow callback as argument to setTimer.")
Timer setTimer(Duration timeout, void delegate() callback, bool periodic = false) Timer setTimer(Duration timeout, void delegate() callback, bool periodic = false)
@safe nothrow { @system nothrow {
return setTimer(timeout, () @trusted nothrow { return setTimer(timeout, () @trusted nothrow {
try callback(); try callback();
catch (Exception e) { catch (Exception e) {