diff --git a/sdlib/d/gc/collector.d b/sdlib/d/gc/collector.d index ea191d4b5..aaa1deba9 100644 --- a/sdlib/d/gc/collector.d +++ b/sdlib/d/gc/collector.d @@ -64,10 +64,10 @@ private: * We might have allocated, and therefore refilled the bin * during the collection process. As a result, slots in the * bins may not be marked at this point. - * + * * The straightforward way to handle this is simply to flush * the bins. - * + * * Alternatively, we could make sure the slots are marked. */ threadCache.flush(); @@ -76,7 +76,7 @@ private: collect(gcCycle); - // allow threads to do busyState things. + // Probation period is over, threads can enter busy state now. clearWorldProbation(); } diff --git a/sdlib/d/gc/tstate.d b/sdlib/d/gc/tstate.d index 62a4b7e9c..770a7dcec 100644 --- a/sdlib/d/gc/tstate.d +++ b/sdlib/d/gc/tstate.d @@ -158,7 +158,8 @@ public: return; } - // In Resumed state, we need to wait until the GC cycle is done before doing anything. + // In Probation state, we need to wait until the GC cycle is + // done before doing anything. busyWaitMutex.lock(); scope(exit) busyWaitMutex.unlock(); busyWaitMutex.waitFor(offProbation); @@ -356,7 +357,7 @@ unittest suspend { assert(s.onSuspendSignal()); check(SuspendState.Probation, false, 1); - // Clear the probation + // Clear the probation. s.clearProbationState(); check(SuspendState.None, false, 1); @@ -377,7 +378,7 @@ unittest suspend { assert(s.exitBusyState()); check(SuspendState.Probation, false, 2); - // Enter busy state while on probation + // Enter busy state while on probation. assert(lockedProbationCount.load() == 0); s.enterBusyState(); assert(lockedProbationCount.load() == 1); diff --git a/test/valid/test0203.d b/test/valid/test0203.d index 86d89dfa6..05f6f1041 100644 --- a/test/valid/test0203.d +++ b/test/valid/test0203.d @@ -51,7 +51,6 @@ void* watchdog(void* ctx) { threadCache.state.state.store(SuspendState.Detached); int i; while (!shouldQuit.load()) { - // Watchdog timeout! assert(++i < 15, "Watchdog timeout!"); sleep(1); }