Skip to content
This repository was archived by the owner on Apr 20, 2020. It is now read-only.

Conversation

m-novikov
Copy link
Contributor

This pull request is a rework of the cancellation mechanism of lazyflow.
It replaces cancellation calback propagation with CancellationToken mechanism (article about this concept)

What's wrong with callbacks?

Given that lazyflow operators and APIs often used in unexpected places it's possible that anyone at any point can call cancel. With the cancellation token mechanism, only a parent request creator can cancel the request and will be notified about it.
Also it should reduce amount of created callbacks in graph, while we will share reference to parent cancellation token.

TODO

  • Test for cancellation when multiple requests waiting on 3rd requests
  • Investigate possibility of race conditions during cancellation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant