def actor_cancelled(self, actor: Actor, future: Future): logger.info("Actor is done! Cancellation or Finished??") if future.cancelled(): logger.info("Future was cancelled everything is cools")
def _set_result_unless_cancelled(fut: Future, result: Any) -> None: """Set the result only if the Future was not cancelled.""" if fut.cancelled(): return fut.set_result(result)
def _set_result_unless_cancelled(fut: Future, result: Any) -> None: """Set the result only if the Future was not cancelled.""" if fut.cancelled(): return fut.set_result(result)
def on_done(status: Future, task: Future) -> None: status.set_result("cancelled" if task.cancelled() else "done")