Make ioManagerDie() idempotent
authorSimon Marlow <marlowsd@gmail.com>
Thu, 1 Apr 2010 10:07:05 +0000 (10:07 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 1 Apr 2010 10:07:05 +0000 (10:07 +0000)
Avoids screeds of "event buffer overflowed; event dropped" in
conc059(threaded1).

rts/win32/ThrIOManager.c

index 50dd4fb..35f1b5e 100644 (file)
@@ -123,6 +123,10 @@ void
 ioManagerDie (void)\r
 {\r
     sendIOManagerEvent(IO_MANAGER_DIE);\r
+    // IO_MANAGER_DIE must be idempotent, as it is called\r
+    // repeatedly by shutdownCapability().  Try conc059(threaded1) to\r
+    // illustrate the problem.\r
+    io_manager_event = INVALID_HANDLE_VALUE;\r
     // ToDo: wait for the IO manager to pick up the event, and\r
     // then release the Event and Mutex objects we've allocated.\r
 }\r