diff options
author | Ian Lynagh <igloo@earth.li> | 2006-12-15 16:42:10 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2006-12-15 16:42:10 +0000 |
commit | 5d48ad2707548f077e2856b41c4864f6a1efb3cc (patch) | |
tree | de44f7510b816e3e918067e4561d6837b3f29d57 /rts/Task.c | |
parent | 221e74f6814f76430ff74b970a77393b0ae83eb5 (diff) | |
download | haskell-5d48ad2707548f077e2856b41c4864f6a1efb3cc.tar.gz |
Put the task on the free list in workerTaskStop
Diffstat (limited to 'rts/Task.c')
-rw-r--r-- | rts/Task.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Task.c b/rts/Task.c index 551f13777a..9aa43c08c2 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -251,6 +251,11 @@ workerTaskStop (Task *task) taskTimeStamp(task); task->stopped = rtsTrue; tasksRunning--; + + ACQUIRE_LOCK(&sched_mutex); + task->next = task_free_list; + task_free_list = task; + RELEASE_LOCK(&sched_mutex); } void |