postrank-labs/goliath — pull request #292 by esebastian (2014-04-27 21:01:10+00:00)
Title: Use logger inside the stop method avoiding mutex from trap context

In #271 the log statement in ```Server#stop``` was removed to avoid the ```'lock': can't be called from trap context (ThreadError)``` message appearing on Ruby 2, as it seemed that the only workaround was spawning a thread.

As per eventmachine/eventmachine#148 it turns out that there is another alternative: calling ```add_timer(0)``` from the trap context.

I think it can be useful to maintain the log message if this workaround seems right.