This method can be useful when deciding when to stop EventMachine. For example, after thousands of connections established by EventMachine and each connection could defer some actions, this method reliably tells whether it's safe to stop EventMachine or not. It could be used repeatedly after the last connection has unbound.
Otherwise it's not easy to decide when it's safe to stop EventMachine, even after the last connection has unbound. And it's not safe to stop EventMachine right away because it'll #kill the running threads in the threadpool.
remove double require 'thread'
defers_finished?: don't return false if there never was a deferred ac…
Merge pull request #316 from paddor/master