DosOpen Thread Blocked Pending DosWaitNmPipe (98416)
This article was previously published under Q98416
SUMMARY
DosOpen() local call threads become blocked if a remote pipe does not
open pending a DosWaitNmPipe() in a different thread. This is by design in
OS/2 and is easily worked around.
MORE INFORMATION
Set the ulTIMEOUT parameter of DosWaitNmPipe to a small value that is
an acceptable postponement for other I/O--maybe 2 seconds--then put
the DosWaitNmPipe in a loop. The DosWaitNmPipe now, in effect, "waits
forever" (unless you want to limit the loop instance), but every 2
seconds other I/O from threads within the same process are serviced.
OS/2 serializes I/O at the process level, which creates (essentially)
a queue of I/O requests per process. If two threads within the same
process issue I/O calls to the operating system, the first one (longest
time in queue) becomes the DosWaitNmPipe, and the second becomes the
DosOpen. The operating system must complete processing the DosWaitNmPipe
before it can entertain the DosOpen.
This behavior is not present in NT, as NT serializes I/O per thread,
not per process.
Modification Type: |
Major |
Last Reviewed: |
7/30/2001 |
Keywords: |
KB98416 |
|