TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Ferdinando Cosentino
from: David Noon
date: 1995-12-01 19:58:00
subject: _beginthread killthread

On Sunday, 95/11/26, Ferdinando Cosentino wrote to Mario Semo about
"_beginthread killthread" as follows:

FC> So, how do you communicate to a thread that it must stop itself?
FC> Please, NO active polling, or other time-consuming activities...

Hi Ferdinando,

You set a flag to order the thread to commit suicide and then you post
an event semaphore. Other values of the flag tell the thread to do
other things.

However, you must code your secondary thread correctly!

Alternatively, you can use a programming language whose run-time
library supports thread shutdown from outside. [See signature block.]

Regards

Dave


 * KWQ/2 1.2i * "Microsoft plays with themselves." - Philippe Kahn

--- Maximus/2 3.00
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/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™.