| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Threads |
MB> > For example, if you trigger the event semaphore > every 10 bytes, and you physically receive 5 bytes, then > those 5 bytes will sit in the buffer forever unless you > either receive 5 more bytes or do something special to get > them out of there. > > [ Loads of stuff about timers deleted ] MB> The best design is to use Wait-For-Something on the serial port with a large buffer and to post the event semaphore every time that DosRead returns some data. This has the dual advantages that the consumer thread never has to worry about "missed" data (since the event semaphore is *always* posted) and the producer thread never has to worry about large overheads for individual characters, since Wait-For-Something will get a whole bufferful of data in one DosRead call if there are that many data available. This also moves all of the "timeout" processing into its proper place : in the serial device driver. > JdeBP < ___ X MegaMail 2.10 #0: --- Maximus/2 3.01* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4) SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955 SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809 @PATH: 440/4 141/209 270/101 712/515 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™.