def close(self):
    'Stops to collect replies from its task.'
    self.set_exception(TaskClosed)
    self.collector.remove_result(self)
Stops to collect replies from its task.
def close(self):
    
    self.set_exception(TaskClosed)
    self.collector.remove_result(self)