| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | DosRead blocking |
-=> Quoting James R. Cook to All <=-
JRC> Isn't DosRead supposed to block if no bytes are available to be read?
JRC> I'm playing with serial I/O threads and if DosRead doesn't ever block
JRC> on a read from the comm port, there's no reason for the overhead of a
JRC> thread, mutex semaphore and all that other garbage. Thanks!
Yes, DosRead will block, but you have to tell the com port which mode to
use.
from bsedev.h...
/* fbTimeout */
#define MODE_NO_WRITE_TIMEOUT 0x01
#define MODE_READ_TIMEOUT 0x02
#define MODE_WAIT_READ_TIMEOUT 0x04
#define MODE_NOWAIT_READ_TIMEOUT 0x06
Check out pmtermsr.{lzh|zip} by Peter Fitzsimmons. It is a good example
of this, as well as fast scrolling in a PM window.
You can find it by doing a search from http://filez.com
And its probably freq'able from Peter's BBS, too.
Phil Crown
pcrown{at}airmail.net
http://web2.airmail.net/pcrown/
--- Blue Wave/OS2 v2.30
* Origin: * MacSavvy OS/2 BBS * Dallas, Texas * 972-250-4479 * (1:124/1208)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/311 407 505 506 515 517 624 628 704 824 841 713/317 SEEN-BY: 800/1 @PATH: 124/1208 1 396/1 270/101 712/515 624 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.