diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-12-10 03:55:51 +0000 |
---|---|---|
committer | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2020-12-10 04:31:18 +0000 |
commit | b0ad86fb84fbd2ac78208e6545c48c7a09e7f4aa (patch) | |
tree | ae00f6d831c768b2214ff6900c182f636e73011e | |
parent | b1b55be16f901f1eb67937560379fa9a75c88581 (diff) | |
download | haskell-b0ad86fb84fbd2ac78208e6545c48c7a09e7f4aa.tar.gz |
nonmoving: Add comments to nonmovingResurrectThreads
-rw-r--r-- | rts/sm/NonMovingMark.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/sm/NonMovingMark.c b/rts/sm/NonMovingMark.c index 183c366a56..16085cb27a 100644 --- a/rts/sm/NonMovingMark.c +++ b/rts/sm/NonMovingMark.c @@ -1929,6 +1929,8 @@ void nonmovingTidyThreads () } } +// Mark threads which appear to be dead but still need to be properly torn down +// by resurrectThreads. void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_threads) { StgTSO *next; @@ -1940,6 +1942,9 @@ void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_t case ThreadComplete: continue; default: + // The thread may be, e.g., deadlocked in which case we must ensure + // it isn't swept since resurrectThreads will need to throw it an + // exception. markQueuePushClosure_(queue, (StgClosure*)t); t->global_link = *resurrected_threads; *resurrected_threads = t; |