celery/kombu — pull request #365 by andviro (2014-06-08 18:06:09+00:00)
Title: fixed race condition on closing when using gevent

Hi! When using redis as brocker and gevent as pool there's big and ugly traceback when terminating celery worker. I tracked it to race condition when MultiChannelPoller is closed. Calls to poller.unregister() are non-blocking when using gevent, so self.poller gets assigned to None before some of channels are unregistered. I removed that assignment, hope it will not break anything.