Fix access violation in the log module when called from a non-D thread.
This commit is contained in:
parent
59e3112e95
commit
9e0b5a7821
|
@ -834,7 +834,7 @@ private struct LogOutputRange {
|
||||||
this.info.level = level;
|
this.info.level = level;
|
||||||
this.info.thread = () @trusted { return Thread.getThis(); }(); // not @safe as of 2.065
|
this.info.thread = () @trusted { return Thread.getThis(); }(); // not @safe as of 2.065
|
||||||
this.info.threadID = makeid(this.info.thread);
|
this.info.threadID = makeid(this.info.thread);
|
||||||
this.info.threadName = () @trusted { return this.info.thread.name; } ();
|
this.info.threadName = () @trusted { return this.info.thread ? this.info.thread.name : ""; } ();
|
||||||
this.info.fiber = () @trusted { return Fiber.getThis(); }(); // not @safe as of 2.065
|
this.info.fiber = () @trusted { return Fiber.getThis(); }(); // not @safe as of 2.065
|
||||||
this.info.fiberID = makeid(this.info.fiber);
|
this.info.fiberID = makeid(this.info.fiber);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in a new issue