Avoid TLS overhead for TimerCallbackH and make it fully private.
This commit is contained in:
parent
b5ccb784a1
commit
1284858d2c
|
@ -1142,9 +1142,10 @@ struct Timer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// private
|
private struct TimerCallbackHandler(CALLABLE) {
|
||||||
struct TimerCallbackHandler(CALLABLE) {
|
static __gshared TimerCallbackHandler ms_instance;
|
||||||
static TimerCallbackHandler instance;
|
static @property ref TimerCallbackHandler instance() @trusted nothrow { return ms_instance; }
|
||||||
|
|
||||||
void handle(TimerID timer, bool fired)
|
void handle(TimerID timer, bool fired)
|
||||||
@safe nothrow {
|
@safe nothrow {
|
||||||
if (fired) {
|
if (fired) {
|
||||||
|
|
Loading…
Reference in a new issue