Fix #2992: don't create a named event
authorSimon Marlow <marlowsd@gmail.com>
Wed, 11 Mar 2009 09:42:08 +0000 (09:42 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 11 Mar 2009 09:42:08 +0000 (09:42 +0000)
Evidently I misread the docs for CreateEvent: if you pass a name to
CreateEvent, then it creates a single shared system-wide Event with
that name.  So all Haskell processes on the machine were sharing the
same Event object.  duh.

rts/win32/ThrIOManager.c

index e2310ef..c52928c 100644 (file)
@@ -34,7 +34,7 @@ getIOManagerEvent (void)
         hRes = CreateEvent ( NULL, // no security attrs\r
                              TRUE, // manual reset\r
                              FALSE, // initial state,\r
-                             "IO Manager Event" );\r
+                             NULL ); // event name: NULL for private events\r
         if (hRes == NULL) {\r
             sysErrorBelch("getIOManagerEvent");\r
             stg_exit(EXIT_FAILURE);\r