taskflow
taskflow copied to clipboard
Feature Request: API to remove dependency between two tasks
Is there a way to remove a dependency between two tasks after it's been established?
Hello, thank you for this excellent library!
I'm currently using Taskflow to build a dynamic task graph editor, where users can create and remove connections (i.e., dependencies) between tasks at runtime.
I noticed that once a dependency is created via taskA.precede(taskB), there doesn't seem to be a way to remove it later unless I rebuild the entire Taskflow graph. I understand that Taskflow is designed to work with static DAGs, but for certain interactive applications (such as flow-based editors or graphical pipelines), it would be helpful to programmatically remove a dependency between two tasks, similar to how we can establish one.
Questions:
- Is there any internal or planned API that allows removing a dependency between two tasks (e.g.,
taskA.remove_precedence(taskB))? - If not, is this feature something that could be considered in a future version?
- Are there any suggested workarounds besides rebuilding the entire graph?
Thanks again for your great work!