[dmd-concurrency] Thread termination protocol (shutdown protocol evolved)
Michel Fortin
michel.fortin at michelf.com
Thu Jan 21 11:06:30 PST 2010
Le 2010-01-21 à 13:36, Robert Jacques a écrit :
> Looks okay at first glance. To reduce namespace pollution: terminate(tid) -> tid.terminate. Also, overloading spawn and spawnOwned should also be considered.
Overloading could work. The advantage of a different name though is that it's easier to spot while reading the code that you're giving ownership to a different thread.
> To clarify, the exception/terminate message passing are passed with the same priority as normal messages, so they only get re-thrown after prior messages are sent / received / etc. Correct?
That was the idea, yes.
I think the simplest case (sequential) should be the default. That said, it might be useful to add a policy to be able to receive messages by priority, and not just exception messages. But it's probably a little premature right now.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the dmd-concurrency
mailing list