| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | threads & pipes/serial ports |
Hi Darin,
am 10.12.96 23:14 erz„hltest Du All
DM> I haven't done much multi-threading (read: practically none) and was
DM> wondering if anyone would be willing to help me with the design of a
DM> simple multithreaded object.
Is your program a PM application?
No: You my do all your work on one thread.
If you have to do some differnt actions at same time you can use
one or more threads too.
Yes: You *must* use an other thread for your file I/O because the PM messages
must handled alway in 1/10s.
Your PM thread is always waiting for messages. You can POST
to them without having a own message queue by using
WinPostMsg(hwnd, WM_USER + x, .....)
The constant WM_USER is defined to give you a Chance to post
or send user defined messages. So your PM thread can do
anything your I/O thread is unable to do and the PM is not
knowing on except to present you the message.
You my syncronize your I/O thread with semaphores of any kind.
But you should block your PM thred ONLY by Mutex semaphore
to block simoultanous access to same memory locations or
other resources. DON'T block the PM thread by Event semaphores!
Herbert
Member #53 of Team/OS2 Germany
--- Sqed/32 1.13b2/r00196
* Origin: Schont die Umwelt: Vermeidet DOSen (2:2476/493)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 2476/493 400 245/5530 2455/112 24/888 396/1 270/101 712/515 711/808 @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™.