Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Cancelled Task State Futures. #3930

Open
2 tasks
BarrySlyDelgado opened this issue Sep 9, 2024 · 0 comments
Open
2 tasks

Get Cancelled Task State Futures. #3930

BarrySlyDelgado opened this issue Sep 9, 2024 · 0 comments
Labels
bug For modifications that fix a flaw in the code. good-first-issue A simpler issue that would be a good starting point for a new contributor TaskVine

Comments

@BarrySlyDelgado
Copy link
Contributor

We have some use cases in which we want to check if a task is cancelled (FuturesExecutor). When a task is cancelled, this state may become an attribute of the task and should be retrievable via the Python bindings.

  • Cancel tasks correctly via futures executor.
  • Retrieve cancelled status.

This is the current code that does not work:

def cancel(self):
self._task._module_manager.cancel_by_task_id(self._task.id)
self._state = CANCELLED
def cancelled(self):
state = self._task._module_manager.task_state(self._task.id)
if state == cvine.VINE_TASK_CANCELED:
return True
else:
return False

@BarrySlyDelgado BarrySlyDelgado added bug For modifications that fix a flaw in the code. TaskVine good-first-issue A simpler issue that would be a good starting point for a new contributor labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For modifications that fix a flaw in the code. good-first-issue A simpler issue that would be a good starting point for a new contributor TaskVine
Projects
None yet
Development

No branches or pull requests

1 participant