diff options
author | sdagley%netscape.com <devnull@localhost> | 1999-05-19 02:49:00 +0000 |
---|---|---|
committer | sdagley%netscape.com <devnull@localhost> | 1999-05-19 02:49:00 +0000 |
commit | 8d5448599928099838d05a264f2cb101003e6f4a (patch) | |
tree | 82a1ca44ce64a997e3c1bda210d6e56ca35bbffd | |
parent | 10e9593ee532bfc7db192aad1ed8085c4bd68eb3 (diff) | |
download | nspr-hg-8d5448599928099838d05a264f2cb101003e6f4a.tar.gz |
Add test to see if async I/O has completed before we actually yield the thread. Part of the I/O improvments tagged under bug #3536. Approved wtc.
-rw-r--r-- | pr/src/md/mac/macio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pr/src/md/mac/macio.c b/pr/src/md/mac/macio.c index 0ee19ad2..9470e17b 100644 --- a/pr/src/md/mac/macio.c +++ b/pr/src/md/mac/macio.c @@ -275,8 +275,10 @@ PRInt32 ReadWriteProc(PRFileDesc *fd, void *buf, PRUint32 bytes, IOOperation op) (void) PBReadAsync(&pbAsync); else (void) PBWriteAsync(&pbAsync); - - WaitOnThisThread(me, PR_INTERVAL_NO_TIMEOUT); + + /* See if the i/o call is still pending before we actually yield */ + if (pbAsync.pb.ioParam.ioResult == 1) + WaitOnThisThread(me, PR_INTERVAL_NO_TIMEOUT); } err = me->md.osErrCode; |