Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions std/concurrency.d
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,22 @@ private:


MessageBox mbox;

public:

/**
* Generate a convenient string for identifying this Tid. This is only
* useful to see if Tid's that are currently executing are the same or
* different, e.g. for logging and debugging. It is potentially possible
* that a Tid executed in the future will have the same toString() output
* as another Tid that has already terminated.
*/
void toString(scope void delegate(const(char)[]) sink)
{
import std.format;
formattedWrite(sink, "Tid(%x)", &mbox);
}

}


Expand Down Expand Up @@ -1447,6 +1463,7 @@ private
size_t m_localMsgs;
size_t m_maxMsgs;
bool m_closed;

}


Expand Down