'Register a worker with this ioloop'

def register_worker(self, worker):

    def on_close(worker):
        def close_worker(worker):
            worker.socket.close()
            self._workers.discard(worker)
        self._pending_commands.append((lambda : close_worker(worker)))
        self.pinger.ping()
    worker.on_close = on_close
    worker.pinger = self.pinger
    self._pending_commands.append((lambda : self._workers.add(worker)))
    self.pinger.ping()
