digitalmars.D.bugs - [Issue 13376] New: std.concurrency.Tid needs a human-readable
- via Digitalmars-d-bugs (29/29) Aug 25 2014 https://issues.dlang.org/show_bug.cgi?id=13376
https://issues.dlang.org/show_bug.cgi?id=13376 Issue ID: 13376 Summary: std.concurrency.Tid needs a human-readable ID/hash string Product: D Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: kevin.lamonte gmail.com std.concurrency.Tid does not have toHash(), and its %s representation is simply "Tid(std.concurrency.MessageBox)". With no unique ID for a Tid to put in a logfile, it is extraordinarily difficult to debug multi-threaded applications that use std.concurrency. This effectively makes passing Tids through a logging subsystem (e.g. burner's current std.logger proposal) mostly pointless. Please either add (or document in std.concurrency) a way to display a unique numeric-like string (not a name to pass to locate()) for a Tid, such that one can clearly see which thread a particular logging message came from. (A nice bonus would be a way to obtain the Tid given this string, since Tid's don't always have names. It looks like the only way for thread A to communicate with thread B is if B registered its Tid with a name or A is B's parent. If we had a _guaranteed_ string<-->Tid mapping, then any Tid could talk to any other Tid. But this could also lead to a significant difference in concurrency philosophy.) --
Aug 25 2014