Artifacts Associated With Ticket 990500ffffffffff
Ticket change [cda90fe079] (rid 95932) by mistachkin on 2004-07-13 21:44:38:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I believe the NotifierThreadProc function in "unix/tclUnixNotfy.c" should end with a call to TclpThreadExit, to allow the pthread library to clean up any internal resources associated with the notifier thread. The general principal here is that threads created with TclpThreadCreate must be exited using TclpThreadExit.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mistachkin"
- subsystem initialized to: "49. Threading"
- title initialized to: "NotifierThreadProc missing TclpThreadExit at end"
- type initialized to: "Bug"
Ticket change [b23f58956c] (rid 98299) by andreas_kupries on 2004-07-16 05:30:36:
- icomment:
Logged In: YES user_id=75003 Hm. The description of that function says: Once started, this routine never exits. It dies with the overall process. In other words, even if we add TclpThreadExit it will never be reached, right ? Hm, looking at the code instead I find that there is a way for the thread proc to exit, via a 'break' in its infinite loop. And that is done in response to reception of a 'quit message'. There is some other cleanup happening already ... I guess we can do the TclpThreadExit as well, as the very last action. Still, given Zoran's recent experience in this area (threads & notifier) I wait a bit on this will ask some other people to have a look at this as well.
- login: "andreas_kupries"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "andreas_kupries"
- icomment:
Ticket change [4c2ebc249c] (rid 126833) by vasiljevic on 2004-07-16 15:40:39:
- icomment:
Logged In: YES user_id=95086 I believe Joe is right. Every thread created by pthread_create should eventually call pthread_exit at the end of its life. Otherwise pthread library leaks. At this particular spot this is not very tragic for tclsh-like applications where main thread and the notifier thread exit just at the end of the app. But in systems loading and finalizing Tcl library as a subsystem, this may pose memory problems (leaks). My oppinion is: go ahead and add the TclpThreadExit at the end.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [06ab939b60] (rid 89253) by andreas_kupries on 2004-07-17 00:38:48:
- closedate changed to: "2004-07-16T17:38:48"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 Accepted and committed the change, to both head and 8.4 branch
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"