Add EventMachine.defers_finished? #316

Merged
merged 3 commits into from Apr 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

paddor commented Apr 19, 2012

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.

@raggi raggi added a commit that referenced this pull request Apr 21, 2012

@raggi raggi Merge pull request #316 from paddor/master
Add EventMachine.defers_finished?
a92b667

@raggi raggi merged commit a92b667 into eventmachine:master Apr 21, 2012

Contributor

raggi commented Apr 21, 2012

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment