From: Charles Oliver Nutter Date: 2008-03-22T15:04:05+09:00 Subject: Re: Thread#raise, Thread#kill, and timeout.rb are unsafe ara howard wrote: > > On Mar 18, 2008, at 11:52 AM, MenTaLguY wrote: > >> I think the only way around this is for the receiving thread to >> explicitly choose moments when it wants to receive any pending >> asynchronous exceptions. Can you think of another way? > > > > perhaps i wasn't being clear. that's exactly what i was showing - a > handler that gets called (critical section of course) which simply > enques the exception. then the thread itself must check for these at > the 'right' moment. Presumably by "critical section" you mean "locking on as narrow a lock as possible so as not to stop the whole freaking world because one thread wants to send an event to another". critical= is the devil. - Charlie