<div dir="ltr">Then again... it is up to the child's start function to create the link, and from the supervisor's point of view, the only place to add the monitor would be when the start function returns - which would be just another place to get a race :(</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/15 Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div class="im"><div>On 15 May 2013, at 11:17, Robert Virding wrote:</div></div><div><div class="im"><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div>
<div style="font-size:12pt;font-family:'times new roman','new york',times,serif">Do you mean only using monitors in the supervisor, and no links? If so that would not work as you would then not get an exit signal automatically sent to the child when the supervisor dies.</div>
</div></span></blockquote><div><div><blockquote type="cite"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">Which you do want. Or have I misunderstood you?<br><br></div>
</div></blockquote><br></div></div></div><div>Oh gosh, how embarrasing. I was thinking in terms of <span style="font-family:NimbusRomNo9L;font-size:12px;font-weight:500">Uni-directional Links (viz A Unified Semantics for Future Erlang, Svensson et al), and linking child to parent (so as to propagate supervisor exits) but not the other way around. Of course we can't do that - just ignore this suggestion. [note: </span>I've been implementing the supervisor API for cloud haskell in my spare time and got confused between those semantics (viz <a href="http://haskell-distributed.github.io/static/semantics.pdf" target="_blank">http://haskell-distributed.github.io/static/semantics.pdf</a>) and what I do for a day job in the *real world*].</div>
<div><br></div><div>But switching all the supervisor's signal handling to rely on monitor notifications rather than trapped exits (which might be ignored) sounds good to me. The use of linking would be there to guarantee supervisor death is propagated correctly, but we could switch away from handling child 'EXIT' signals to handling 'DOWN' notifications instead. This would IMO be a bit cleaner.</div>
<div><br></div><div>Cheers,</div><div>Tim</div></div></div></blockquote></div><br></div>