Click here to Skip to main content
16,005,038 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Threading error Pin
Mark Salsbery15-Oct-08 4:40
Mark Salsbery15-Oct-08 4:40 
GeneralRe: Threading error Pin
sriram6518-Dec-08 2:59
sriram6518-Dec-08 2:59 
Questioniocompletionport (IOCP) and threads Pin
swjam7-Oct-08 2:49
swjam7-Oct-08 2:49 
AnswerRe: iocompletionport (IOCP) and threads Pin
Mark Salsbery7-Oct-08 4:07
Mark Salsbery7-Oct-08 4:07 
GeneralRe: iocompletionport (IOCP) and threads Pin
led mike7-Oct-08 4:17
led mike7-Oct-08 4:17 
GeneralRe: iocompletionport (IOCP) and threads Pin
Mark Salsbery7-Oct-08 4:23
Mark Salsbery7-Oct-08 4:23 
GeneralRe: iocompletionport (IOCP) and threads Pin
swjam7-Oct-08 4:37
swjam7-Oct-08 4:37 
GeneralRe: iocompletionport (IOCP) and threads Pin
Mark Salsbery7-Oct-08 4:53
Mark Salsbery7-Oct-08 4:53 
IOCPs are a bit confusing at first Smile | :)


swjam wrote:
surely each function will be different for each thread associated with a device?


Not so. There's no parameter passed to GetQueuedCompletionStatus() that associates
the thread with a certain device. You'll need to provide any association yourself
in your overlapped structures.


swjam wrote:
how then does the system know which one to wake up when an entry appears in the competion queue?


It's undocumented, but it may just take the next thread waiting in
GetQueuedCompletionStatus(). There's no particular order or association with
a certain thread.


These articles helped me a lot when I first used an IOCP.
They are socket-related but the same principles apply to any
overlapped IO device...

Writing Windows NT Server Applications in MFC Using I/O Completion Ports[^]
Write Scalable Winsock Apps Using Completion Ports[^]
INFO: Design Issues When Using IOCP in a Winsock Server[^]

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

QuestionWinObj Question/Documentation ??? Pin
ForNow7-Oct-08 2:12
ForNow7-Oct-08 2:12 
QuestionConvert Integer to CString Pin
phanindra varma7-Oct-08 1:06
phanindra varma7-Oct-08 1:06 
AnswerRe: Convert Integer to CString Pin
Michael Schubert7-Oct-08 1:08
Michael Schubert7-Oct-08 1:08 
AnswerRe: Convert Integer to CString Pin
Rajesh R Subramanian7-Oct-08 1:36
professionalRajesh R Subramanian7-Oct-08 1:36 
GeneralRe: Convert Integer to CString Pin
Michael Schubert7-Oct-08 1:39
Michael Schubert7-Oct-08 1:39 
GeneralRe: Convert Integer to CString Pin
phanindra varma7-Oct-08 4:18
phanindra varma7-Oct-08 4:18 
GeneralRe: Convert Integer to CString Pin
Rajesh R Subramanian7-Oct-08 5:55
professionalRajesh R Subramanian7-Oct-08 5:55 
GeneralRe: Convert Integer to CString Pin
phanindra varma18-Oct-08 4:04
phanindra varma18-Oct-08 4:04 
GeneralRe: Convert Integer to CString Pin
vijay_aroli7-Oct-08 6:26
vijay_aroli7-Oct-08 6:26 
AnswerRe: Convert Integer to CString Pin
David Crow7-Oct-08 3:36
David Crow7-Oct-08 3:36 
GeneralRe: Convert Integer to CString Pin
Michael Schubert7-Oct-08 3:49
Michael Schubert7-Oct-08 3:49 
GeneralRe: Convert Integer to CString Pin
Rajesh R Subramanian7-Oct-08 5:10
professionalRajesh R Subramanian7-Oct-08 5:10 
GeneralRe: Convert Integer to CString Pin
ThatsAlok7-Oct-08 19:27
ThatsAlok7-Oct-08 19:27 
GeneralRe: Convert Integer to CString Pin
Hamid_RT7-Oct-08 5:13
Hamid_RT7-Oct-08 5:13 
QuestionTimer Problem Pin
MsmVc7-Oct-08 0:11
MsmVc7-Oct-08 0:11 
AnswerRe: Timer Problem Pin
Cedric Moonen7-Oct-08 0:15
Cedric Moonen7-Oct-08 0:15 
GeneralRe: Timer Problem Pin
MsmVc7-Oct-08 0:40
MsmVc7-Oct-08 0:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.