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
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue