TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Johannes Stratmann
date: 1997-03-10 21:26:24
subject: DosRead blocking

Hello Peter!


 PF> This may actually be counter productive;  by servicing the device
 PF> driver too often,  you will call DosRead() more often (then if your
 PF> thread was running at a lower priority).  The DosRead() calls will
 PF> transfer fewer bytes with each call (perhaps as low as 1 to 10
 PF> bytes).  Since the overhead of calling DosRead() is _huge_,  you want
 PF> to call it as few times as possible,  and get as many bytes back with
 PF> each call (this is why "Wait for something" read timeout processing
 PF> is so cool).

The Timeout=0 seems to be dangerous in OS/2, because when the Application
want's to terminate it can lock the serial Port (or a Socket, the same
applies). So I prefer polling the character count in the buffer that I'am
able to react on a terminate flag. Or is it possible to close the serial
device (or Socket) with an external Program (I wasn't successful when it
tried this) ?

  Bye/2, Johannes!


Internet eMail Adresse: jstratmann{at}cww.de

--- FleetStreet 1.18+
* Origin: OS/2 ist eben nur fuer Profis. (2:2448/9015)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 2448/9015 9000 600 2461/5 396/1 270/101 712/624 711/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™.