windowsaio: fix race condition between IOCP and queue functions