TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Russell Coker
from: David Nugent
date: 1994-08-25 06:15:36
subject: Compiler Recommendations

>    PS  If you know of a way of setting a timeout for a KbdCharIn() so that
 > it will return when a character is pressed or when a time period has
 > elapsed then please let me know.

Use a separate thread for handling the keyboard. Semaphores provide the
facility to wait timeout.

The only gotcha is that you have to handle the keyboard device as a point
of contention between threads - if you've made a blocking call (say
KbdCharIn with IO_WAIT), then almost all other Kbd*() calls will block
until you press a key.

---

* Origin: Unique Computing Pty Ltd (3:632/348)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/301 341 348 365 633/379 635/503
SEEN-BY: 640/820 690/660 711/409 410 413 430 807 808 809 934 712/353 623
SEEN-BY: 713/888 800/1
@PATH: 632/348 711/409 54/54 711/808 809 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™.