Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the issue is from microsoft tech document I/O Completion Ports

"
Please note that while the packets are queued in FIFO order they may be dequeued in a different order.
"

What I have tried:

I can't understand ,because it also stats that"
When an asynchronous I/O operation on one of these file handles completes, an I/O completion packet is queued in first-in-first-out (FIFO) order to the associated I/O completion port.
"
Posted
Updated 18-Jun-18 21:16pm
v2
Comments
Member 10937201 19-Jun-18 3:28am    
Is there anybody can explain for me?

Thanks!

1 solution

They are different queues and it makes sense that one external or remote input isnt waiting for another. The output is local on the Windows machine so enqueing isnt a problem.

But why should one input port wait for another? What if the device has some issue? Waiting is not a solution, but move on when data is occuring.

The I/O ports are a bit like a IP network on the local machine ;-)
 
Share this answer
 
Comments
Member 10937201 4-Jun-18 23:27pm    
thanks for your reply! I still can't understand what you describe,for example, if the remote address post to me it's data wiht characters "abcdefghi",for some reasons,i have to continuously post two WSARecv on the same socket but in the same workthread or in tow workthread concomitantly to obtain all of the characters.the buffer used in the first WSARecv filled by the some front characters of "abcdefghi" ,the buffer used in the Second WSARecv filled by the the rest of characters "abcdefghi" ,is that right? because the book《Network Programming For Microsoft Windows,Second Edition》by Anthony Jones,Jim Ohlund,said that,the buffer can be filled with the order of post WSARecv,that is guaranteed! therefore the IO completion package is also the same order,and they are queued in first-in-first-out (FIFO) order to the associated I/O completion port. and when a completion packet is released to a thread, the system releases the last (most recent) thread associated with that port, passing it the completion information for the oldest I/O completion. Whichever thread is released first,i should get the front data of the characters, but why the completion notification isn't order? so i still can't understand what your explanation. What does it have to do with the device, and What does the device mean?
for reply,thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900