TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: James R. Cook
from: Phil Crown
date: 1997-01-09 06:55:34
subject: DosRead blocking

-=> Quoting James R. Cook to Phil Crown <=-



 PC> If its a PM program I would use a thread to avoid blocking the message

 PC> queue (main) thread for too long.

 JRC> 

 JRC> It's a simple text-mode app.



Then you don't need a second thread since there is no message queue to

worry about.

 

 PC> Also by using a secondary thread you can adjust the priority.  In my

 PC> app the thread that reads the com port runs at PRTYC_TIMECRITICAL and

 PC> all the other threads run at PRTYC_REGULAR.

 JRC> 

 JRC> But does this make a huge deal?  I disremember what SIO uses for

 JRC> buffers, but I would imagine that it's more than adequate.



IMHO: if you want to throw something togather real fast then don't use

threads, if you want to do it right, then use threads! :-)



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 54/99 270/101 620/243 625/0 160 640/201 711/401 409 410 413
SEEN-BY: 711/430 808 809 934 955 712/311 407 505 506 517 623 624 704 841
SEEN-BY: 713/317 800/1
@PATH: 124/1208 1 396/1 270/101 712/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™.