[project @ 2005-06-28 13:44:28 by simonmar]
authorsimonmar <unknown>
Tue, 28 Jun 2005 13:44:28 +0000 (13:44 +0000)
committersimonmar <unknown>
Tue, 28 Jun 2005 13:44:28 +0000 (13:44 +0000)
Add a comment that grabbing all the capabilities before GC causes the
thread->capability hash table to acquire multiple entries for the
current thread, which seems to be harmless.

ghc/rts/Schedule.c

index 8a21d7b..df1cace 100644 (file)
@@ -1906,6 +1906,11 @@ scheduleDoGC( rtsBool force_major )
     // actually did the GC.  But it's quite hard to arrange for all
     // the other tasks to sleep and stay asleep.
     //
+    // This does mean that there will be multiple entries in the 
+    // thread->capability hash table for the current thread, but
+    // they will be removed as normal when the capabilities are
+    // released again.
+    //
        
     // Someone else is already trying to GC
     if (waiting_for_gc) return;