From 6c3f7b65603359ed605062835a62da9f9bd229d6 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 1 Apr 2010 10:07:05 +0000 Subject: [PATCH] Make ioManagerDie() idempotent Avoids screeds of "event buffer overflowed; event dropped" in conc059(threaded1). --- rts/win32/ThrIOManager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rts/win32/ThrIOManager.c b/rts/win32/ThrIOManager.c index 50dd4fb..35f1b5e 100644 --- a/rts/win32/ThrIOManager.c +++ b/rts/win32/ThrIOManager.c @@ -123,6 +123,10 @@ void ioManagerDie (void) { sendIOManagerEvent(IO_MANAGER_DIE); + // IO_MANAGER_DIE must be idempotent, as it is called + // repeatedly by shutdownCapability(). Try conc059(threaded1) to + // illustrate the problem. + io_manager_event = INVALID_HANDLE_VALUE; // ToDo: wait for the IO manager to pick up the event, and // then release the Event and Mutex objects we've allocated. } -- 1.7.10.4