Avoid TLS overhead for TimerCallbackH and make it fully private.

This commit is contained in:
Sönke Ludwig 2019-01-22 18:03:49 +01:00
parent b5ccb784a1
commit 1284858d2c

View file

@ -1142,9 +1142,10 @@ struct Timer {
}
}
/// private
struct TimerCallbackHandler(CALLABLE) {
static TimerCallbackHandler instance;
private struct TimerCallbackHandler(CALLABLE) {
static __gshared TimerCallbackHandler ms_instance;
static @property ref TimerCallbackHandler instance() @trusted nothrow { return ms_instance; }
void handle(TimerID timer, bool fired)
@safe nothrow {
if (fired) {