Overview
| Artifact ID: | a1995b5dbe8d8b4fc6b1addb140c546c8a56894a |
|---|---|
| Ticket: | 770053ffffffffffffffffffffffffffffffffff
Tcl_CreateThread breaks notifier thread refcount |
| User & Date: | vasiljevic on 2003-07-12 08:30:50 |
Changes
- assignee changed to: "hobbs"
- cmimetype changed to: "text/plain"
- comment changed to:
Tcl API is quite unsymetrical when creating threads without embedded interpreter. What hapenns is that when one uses Tcl_CreateThread API call to create new thread and Tcl_ExitThread to cleanup after itself when the thread exits, the notifier thread reference counter is decremented one time too much. This eventually tears-down the notifier thread and the inter-thread communication betwenn threads becomes impossible. If, however, a newly created thread calls the Tcl_CreateInterp, the reference count is ok. The problem lies in the fact that Tcl_CreateInterp calls, as part of its processing, Tcl_InitNotifier. This call bumps the refcount of the notifier thread. The Tcl_ExitThread calls Tcl_FinalizeNotifier and this decrements the refcount. In this case, all is ok. But, the Tcl_CreateThread *does not* call the Tcl_InitNotifier, which then results in wrong refcount of the notifier thread when Tcl_ExitThread is called. I'm assigning this to Jeff since I do not know who is maintaining the thread API subsytem.
- foundin changed to: "obsolete: 8.4.3"
- priority changed to: "6"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "vasiljevic"
- subsystem changed to: "49. Threading"
- title changed to: "Tcl_CreateThread breaks notifier thread refcount"
- type changed to: "Bug"