std.experimental.logger formal review round 3

Kevin Lamonte via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 5 16:40:30 PDT 2014


On Sunday, 5 October 2014 at 17:06:06 UTC, Sean Kelly wrote:

> Having an identifier for logging is a bit different.  Would 
> using the MessageBox address be sufficient?  I'd be happy to 
> add a Tid.id property that returns a value like this.  I'd 
> rather not try to generate a globally unique identifier though 
> (that would probably mean a UUID, which is long and expensive 
> to generate).

I think Tid.id returning the MessageBox address would be fine for 
logging purposes.  The main value is being able to distinguish 
messages coming in at the same time from multiple threads.  Even 
if a MessageBox address was re-used by a new receive()er after a 
previous one exited I doubt it would confuse users very much.  I 
thing that a doc on Tid.id like "this value will not be the same 
as any other Tid currently existing, but might be the same as a 
Tid that has exited previously" would be sufficient.


More information about the Digitalmars-d mailing list