add a way to ask the IO manager thread to exit