Thread View: comp.os.os2.programmer
1 messages
1 total messages
Started by Kenneth Porter
Thu, 29 Nov 1990 05:58
Canceling Async Operations
Author: Kenneth Porter
Date: Thu, 29 Nov 1990 05:58
Date: Thu, 29 Nov 1990 05:58
21 lines
1342 bytes
1342 bytes
How do I cancel a DosReadAsync()? Do I have to close the handle, or is there an easier way? I want to get the equivalent effect of the Unix select() call, in which I can block waiting on either characters available or a timeout. The only way I can see to do this is to use DosReadAsync and DosSemWait, and kill the async thread by closing the device out from under it. This is klugy because I have to make the device name and settings available to the wait-for-character code so that I can re-open and configure the device. The application will initially use a serial port, so perhaps the timeout stuff in the DCBINFO can be used, but I need to change the timeout dynamically, as different timeouts apply during different phases of the transmission. Just how does the timeout stuff in DCBINFO work? I would like to eventually use arbitrary devices so a device-independent solution is preferable. Ken (shiva@well.sf.ca.us)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads