Skip to content

Commit

Permalink
Sleep during addDependencyTask example
Browse files Browse the repository at this point in the history
Otherwise, t_5 may not be scheduled yet when we call taskResult, which
now raises an error.
  • Loading branch information
d-torrance committed Nov 21, 2024
1 parent 7587098 commit 2e81b18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions M2/Macaulay2/packages/Macaulay2Doc/threads.m2
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ Node
for i to 5 do t_i = createTask(() -> i)
for i from 1 to 5 do addDependencyTask(t_i, t_(i - 1))
schedule t_0
sleep 1
taskResult t_5
Node
Key
Expand Down

0 comments on commit 2e81b18

Please sign in to comment.