TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Phil Crown
from: Dean Roddey
date: 1994-10-23 05:19:18
subject: Qedit/2

Thanks Phil for your msg about Qedit/2, on 19 10-19-1994

PC> while( 1 ) {
PC>   rc = KbdCharIn( &ki, 1, 0 );
PC>   DosSleep( 5 );  // give up time slices this drops the CPU usage from
PC>                   // %100 to %5 in this example
PC> }
PC> 

Under OS/2 you would not sleep because the character input call
would not return until a character arrived. Your app (or this
thread) would actually be asleep. I think JdeBP means that they
are not making a call that sleeps but just running in a loop. This
is considered very bad citizenship under OS/2 or any multithreaded
system. Doing the right way means no CPU usage at all until a key
is actually pressed.

___
 X KWQ/2 1.2b X "640K ought to be enough for anybody." - Bill Gates, 1981

--- Maximus/2 2.01wb

* Origin: Fernwood - your source for OS/2 files! (1:141/209)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1
@PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809
@PATH: 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™.