On Sun, Feb 24, 2013 at 1:15 PM, SASADA Koichi <ko1 / atdot.net> wrote:
> (2013/02/23 11:31), kosaki (Motohiro KOSAKI) wrote:
>> Currently, ruby library have no way to detect a method is called from trap handler or not.
>> This is useful because Mutex#lock under trap raises an exception and some libraries may want to avoid it.
>
> I'm not sure why it is useful. If a lock is needed, then the lock should
> be acquired in trap handler (and not supported yet). Detecting it is in
> trap, and do what?

The most obvious usecase is to improve better error handling and
better error messages.

And yes, we need several further steps. e.g. masking trap.