Closed rjattrill closed 8 years ago
Thanks @rjattrill. This fixes your test case, in every case? I re-ran some of the tests that were failing, which are not related to your change. Now it's green.
The code looks good. The next possible failure here is if monitor
somehow becomes NilClass
or no longer responds to closed?
for some other reason... but that's a lot less likely than the issue you're addressing, and beyond the bounds of reasonable behavior. But, there's also the cost of two calls instead of one... in the reactor. The effect on any benchmark for non-shutdown instances is probably negligible.
That has me thinking: at shutdown do we catch this and silence it?
Your way would have the benefit of solving the issue without releasing a new Reel
gem, but it is at 0.6.0
but unreleased; it'd be possible to sneak this into there if that ends up being most performant.
Yes, @digitalextremist, this patch does fix my issues. Thank you for fixing the failing test cases, I was hoping that they weren't a result of my patch.
Perhaps a combination of both approaches would be warranted. Try using unless monitor.closed?
but if we still get exceptions of known type, catch them and clean up the error message going out. Do you think monitor.closed?
would ever block?
I am going to merge this, it looks good. Further issues can be addressed in another PR.
:+1: ( @rjattrill Celluloid::IO
commit! )
Thank you @ioquatix and @digitalextremist
Awesome, yeah I'll try to work on celluloid-io a bit over the next two weeks so we can do an update. There are also some outstanding PRs on Celluloid which should probably be merged. Good work everyone.
Refer issue: https://github.com/celluloid/reel/issues/210