Subj : IOCP problem To : comp.programming.threads From : Richard Hollis Date : Tue Jan 25 2005 07:42 am I've setup IOCP for a named pipe server that I have. I create the pipes and then create the completion port and assign it to each pipe in turn. Then I create a couple of worker threads and each worker sits on GetQueuedCompletionStatus. I then started stress testing the server and I've found that I get strange hangs if I use more than one worker thread. I did some reading in this newsgroup yesterday and somebody mentioned that with IOCP it is possible for one than one thread to wake up to handle the event, so I handled this by using a "running" flag for the threads and let one thread actually handle the event, with the others doing nothing, but sending a completion packet back. I though this was working, but it still seems to act strangely when more than one worker thread is created. I think I must be doing something wrong somewhere, but I'm not sure where. I thought I had it licked when I read about the problem that somebody else had and it was exactly the same. Cheers Richard .