Allow object local MessageBox's in concurreny
FG
home at fgda.pl
Tue Feb 12 07:27:06 PST 2013
On 2013-02-12 14:47, monarch_dodra wrote:
> Does anybody have any preliminary feedback, objections, remarks?
You will encounter a possible problem on main thread termination.
Normally it's done automatically in static ~this(): a linkDead message is sent
to all spawned threads listed in "links" and then close() is called on the mbox.
Those linkDead messages have thisTid as sender and that's a problem, because
with custom mailbox thisTid != ownerTid, so the child won't treat that message
as OwnerTerminated. It's caused by "links" being global and populated by
spawn(). And if you make your own spawn, that doesn't touch links, the child
won't be informed about parent's sudden death. How do you work around that?
More information about the Digitalmars-d
mailing list