Hallo Ivanko,

Du schriebst am Thu, 26 Jul 2012 16:52:39 +0500:

> Hmm.. me terminate the application in one of its threads.

Bad practice, I'd say.

> What is Your opinion on proper build such kind of programs (serving a
> long running thread & then self-exiting with a delay before exit) ?

Why don't you set a flag, send a message or use another means to signal the
main thread that your worker thread has terminated (perhaps simply polling
its "terminated" state), do the neccessary clean up and only then exit the
main program? No more worries about thread clean up or synchronization and
suxh...

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to