Ok, thank you henrik. So I understand well that the announcement delivery handler will recast in new thread. The point I do not get (and maybe its obvious, sorry in advance), is why does it raise an error ? When I look at the debugger, it seems that at one moment in the on:fork: method we got a 'context' that is nil whereas it should not. It is quite to understand what is problem (As I do not have a lot of knowledge around that)
2011/6/28 Henrik Johansen <[email protected]> > > On Jun 28, 2011, at 10:23 56AM, Cyrille Delaunay wrote: > > I got another issue related to that i think. > In moose , at one moment in a announcement handling code, we are > doing: Notification signal: 'Save successful!'. > That has for consequence that the on:fork: cuts the stack and I end up with > a 'MessageNotUnderstood: receiver of "sender" is nil'. > So I don't know if the problem is that we are signaling a notification? > > > Yes, if nothing inside the announcement handling code handles it, it will > get handled by the announcement delivery handler which recasts it in new > thread, for the reason Igor mentioned below. > It's not safe to simply pass it on for handling by the code that made the > announcement, if you want to ensure delivery. > > > if yes what should we use to notify something ? > > > ... an Announcement? > > It was because on:fork: cuts the stack. >> If you signaling exception in your code, you should handle it before >> leaving your #actionSelector method. >> Otherwise you may put the rest recipients of announcement in danger >> and that's why there #on:fork: to prevent that. >> >> >> -- >> Best regards, >> Igor Stasenko AKA sig. >> >> > > > Cheers, > Henry >
