Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Terminating Threads in VC++

Status
Not open for further replies.

Almor

Newbie level 1
Joined
Aug 23, 2006
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,286
Can anybody help me to understand How terminate a worker thread created with AfxBeginThread(..) function in MFC application.
I mean to terminate worker thread from original thread.

Thank you for advance.
 

newelltech

Full Member level 4
Joined
Aug 23, 2006
Messages
216
Helped
34
Reputation
68
Reaction score
2
Trophy points
1,298
Activity points
2,929
From within the thread, call AfxEndThread() or simply return from the worker thread start function.

To properly terminate a thread from another thread, you must signal or otherwise communicate to the thread that you want it to terminate and then it should terminate itself. Use one of the many multithreading techniques for signaling or data sharing/locking.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top