Closed spl closed 9 years ago
Okay, so I replaced mapTasks_
with mapTasks
, and then it runs partially. But I realized that I shouldn't expect nested uses of the same TaskGroup
to work because it appears that the outer mapTasks
runs some number of tasks and waits for those tasks to finish, but those outer tasks can't run because they have inner mapTasks
waiting for free slots in the TaskGroup
, which happens to be full of the outer tasks. Consequence: deadlock.
Everything works for me now. So, to summarize my issues for posterity:
mapTasks_
is still broken. See #2.TaskGroup
in nested mapTasks
will likely lead to deadlock. I'm not sure if this should be obvious or if it's worth mentioning somewhere.Since there is not really a new issue here, I'll close this.
After switching from
mapTasks_
tomapTasks
(see #2), I ran a long database migration (3.44 hours). At the end, I found that the code threw an exception:"Match Exception, Node: 74575"
. This appears to be due tofgl
inData.Graph.Inductive.Graph.context
, andfgl
is in my cabal sandbox. Sinceasync-pool
depends onfgl
, logically, the exception is probably coming viaasync-pool
.The code in
mapTasks
did complete, but the code aftermapTasks
did not complete. So, my guess is that it is part of the clean-up ofmapTasks
.Looking at
cleanupTask
, I see two uses offgl
functions (suc
andpre
), and each of them has a reference tocontext
, so those may be suspect.The structure of my code is this:
And, now that I actually look at my code again, I see
mapTasks_
pop up unexpectedly. Looks like I forgot to change this one tomapTasks
. I'm going to run themap (h tg . i) xs
part again withmapTasks
inh
to see if I still get the exception.