[Issue 20160] New: ThreadInfo.cleanup() clears local thread's registered names instead of "this"'s
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Aug 23 22:11:19 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20160
Issue ID: 20160
Summary: ThreadInfo.cleanup() clears local thread's registered
names instead of "this"'s
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: look.at.me.pee.please at gmail.com
Effectively the issue is cleanup() in ThreadInfo was unregistering names for
the local thread being executed, rather than the ThreadInfo that the method was
called with.
import std.concurrency;
void main() {
register("main_thread", thisTid());
ThreadInfo t;
t.cleanup(); // unregisters ThreadInfo.thisInfo Tid instead of "t"'s
assert(locate("main_thread") == thisTid()); // fails
}
--
More information about the Digitalmars-d-bugs
mailing list