Commit 6c3f7b65 authored by Simon Marlow's avatar Simon Marlow
Browse files

Make ioManagerDie() idempotent

Avoids screeds of "event buffer overflowed; event dropped" in
conc059(threaded1).
parent 2726a2f1
...@@ -123,6 +123,10 @@ void ...@@ -123,6 +123,10 @@ void
ioManagerDie (void) ioManagerDie (void)
{ {
sendIOManagerEvent(IO_MANAGER_DIE); 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 // ToDo: wait for the IO manager to pick up the event, and
// then release the Event and Mutex objects we've allocated. // then release the Event and Mutex objects we've allocated.
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment