You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where we want to limit the concurrency, e.g. due to memory allocation constraints
The issue is that, as I feared it would, taskflow schedules itself into a deadlock.
Output looks like:
Start!
Pre task for i = 0, j = 0
Pre task for i = 0, j = 5
Pre task for i = 0, j = 4
Pre task for i = 0, j = 2
Pre task for i = 0, j = 3
Pre task for i = 0, j = 7
Pre task for i = 0, j = 1
Pre task for i = 0, j = 6
Common task for i = 0
Post task for i = 0, j = 7
Post task for i = 0, j = 0
Post task for i = 0, j = 2
Post task for i = 0, j = 3
Pre task for i = 3, j = 3
Pre task for i = 1, j = 0
Post task for i = 0, j = 5
Post task for i = 0, j = 1
Pre task for i = 1, j = 3
Pre task for i = 2, j = 2
Pre task for i = 1, j = 1
Post task for i = 0, j = 6
Pre task for i = 4, j = 1
Post task for i = 0, j = 4
Pre task for i = 2, j = 6
Pre task for i = 1, j = 2
...and then hangs
What would be the best way to rewrite this issue and still limit the concurrency?
Maybe adding another separate acquire (precedes all 8 pre tasks) and release (succeeds all post tasks) task?
And would it be feasible for taskflow to get a scheduler that understands such issue and avoids them? I could imagine that this is, as always, an NP-complete issue or would come with great implications.
Anyway, I think adding a warning to the documentation would be good - Warn users that taskflow may schedule itself into deadlocks when using semaphores
The text was updated successfully, but these errors were encountered:
Assume we have the following example:
Where we want to limit the concurrency, e.g. due to memory allocation constraints
The issue is that, as I feared it would, taskflow schedules itself into a deadlock.
Output looks like:
...and then hangs
What would be the best way to rewrite this issue and still limit the concurrency?
Maybe adding another separate
acquire
(precedes all 8pre
tasks) andrelease
(succeeds allpost
tasks) task?And would it be feasible for taskflow to get a scheduler that understands such issue and avoids them? I could imagine that this is, as always, an NP-complete issue or would come with great implications.
Anyway, I think adding a warning to the documentation would be good - Warn users that taskflow may schedule itself into deadlocks when using semaphores
The text was updated successfully, but these errors were encountered: