CompuServe Thread

#IO requests

2 messages in this thread
#28510From: colin foxJan 2, 1989 9:32 PM
I didn't know that WaitIO() actually removed it from the queue. I guess I'm a bit shakier on IO than I thought. Question, then. When you do either a SendIO() or a DoIO(), _does_ it come back attached to your message port? — Colin —
#28543From: KEITH YOUNGJan 3, 1989 12:24 AM
Okay… If you use DoIO(), the message is sent (added to the queue) and your task will wait for the IO to happen then remove the msg for you (if you had the IOF_QUICK flag set, then — if it could — it was processed immediately and never put on the queue, DoIO() knows whether or not to remove it). SendIO()/BeginIO() will both send the msg (add it to the queue) then return control to your process, you can then use WaitIO() (when you're ready) to wait on it, and then remove the msg from the queue (I wonder if WaitIO() knows about the IOF_QUICK flag?). If you use SendIO/BeginIO and plan to remove the msg yourself _and_ you set the IOF_QUICK flag, then you should test that flag when the IO completes and _not_ remove the msg if it is still set… because it was able to be processed immediately, and was never actually put on the queue. Also note that WaitIO() will not actually wait if the IO is through and ready to be removed. I hope this helps, and that someone will correct me if I'm wrong about any of the above :). – Keith