Subj : Re: IOCP problem To : comp.programming.threads From : David Schwartz Date : Tue Jan 25 2005 12:30 am "Richard Hollis" wrote in message news:-pmdnVl03ojtZWjcRVnyvg@eclipse.net.uk... > 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. Do you ever post more than one I/O for the same pipe in the same direction? > I then started stress testing the server and I've found that I get strange > hangs if I use more than one worker thread. When you say a hang, do you mean a thread is hanging permanently (deadlock) or the server isn't responsive? > 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. If you do that, why bother with IOCP? > 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. You aren't being very precise about what your issue is. DS .