Artifacts Associated With Ticket 999084ffffffffff
Ticket change [a1bd3d0aac] (rid 109779) by dgp on 2004-07-28 00:05:09:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This patch moves the ExitHandler calls of Tcl_Finalize() outside of the TclpInitLock-ed region. This will avoid deadlocks like the one seen in Tk Bug 714956, when the execution of a registered ExitHandler causes another, nested, call to Tcl_Finalize(). This patch should be safe, because the exitHandler loop is careful to always pull the next handler to run from the beginning of the loop, and discard each as it is run, terminating only when the list is empty. The rest of Tcl_Finalize(), protected by a TclpInitLock region, should, we hope, be prevented from making a nested call back into Tcl_Finalize(). Please review.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "02. Event Loops"
- title initialized to: "re-entrant Tcl_Finalize()"
- type initialized to: "Patch"
Add attachment "finalize.patch" [332e2f4cef] (rid 106538) by dgp on 2004-07-28 07:05:09.
Ticket change [de1bcb4308] (rid 114788) by dgp on 2004-07-28 07:05:09:
- icomment:
File Added - 95491: finalize.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e29b34795d] (rid 87659) by dgp on 2004-07-28 21:25:42:
- assignee changed to: "vasiljevic"
- icomment:
Logged In: YES user_id=80530 passing on to someone I think knows Tcl_Finalize() better. This patch fixes a bug, but does it cause any new trouble?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [52e546288c] (rid 126399) by vasiljevic on 2004-07-29 20:04:22:
- icomment:
Logged In: YES user_id=95086 I see no obvious problems. A side-effect, though, is that, when Tcl_Finalize is called simultaneously by two threads, both of them will execute exit callbacks. Each exit callback will be run once, but you never know in which thread this may happen. Strictly speaking, this should pose no problems, provided that exit callbacks are really app-wide and do not assume any thread local storage ownerships and such. Actually, they should be designed as such in the first place.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [6472074c5d] (rid 92775) by dgp on 2004-07-30 22:16:28:
- assignee changed to: "dgp"
- closedate changed to: "2004-07-30T15:16:28"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Thanks! Applying for 8.4.8 and 8.5.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"
- username: "dgp"