Bug 13376 – std.concurrency.Tid needs a human-readable ID/hash string
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-25T11:49:00Z
Last change time
2015-06-09T05:15:01Z
Assigned to
nobody
Creator
kevin.lamonte
Comments
Comment #0 by kevin.lamonte — 2014-08-25T11:49:43Z
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.)
Comment #1 by kevin.lamonte — 2014-09-02T01:32:39Z
*** This issue has been marked as a duplicate of issue 6989 ***