Using objects that manage threads via std.concurrency
Ali Çehreli
acehreli at yahoo.com
Mon Feb 11 22:29:21 PST 2013
On 02/11/2013 01:37 PM, monarch_dodra wrote:
> What should a manager do if it
> calls "receive", and notices the message wasn't meant for him?
Threads receive their own messages. If there is a specific receiver of a
message, then the child sends it to that receiver. As FG said, every
thread has a separate mailbox.
It is possible to introduce threads to each other by their thread ids,
which can be mapped to arbitrary names. (See register, locate, and
unregister in std.concurrency.)
> Does any one have any (simple) literature on the subject?
My experiments have been documented in the following chapter:
http://ddili.org/ders/d.en/concurrency.html
The "Thread names" section in there has a simple example that involves a
third party introducing two threads to each other.
Ali
More information about the Digitalmars-d-learn
mailing list