Overview
| Artifact ID: | 006f1726fbec58262cc4e0eb9fef3e789a41fc12 |
|---|---|
| Ticket: | 2946474fffffffffffffffffffffffffffffffff
[exit] doesn't wait for background flushes of close channels |
| User & Date: | andreas_kupries on 2011-08-11 06:17:12 |
Changes
- icomment:
It also works (the inter-test leakage) because we are using the same name (foo) for the Tcl handler of all these channels. The ghost flush of the channel 24.1 is put into the event queue of the main thread, because that is where the handler lives. Then the thread exits, the event is still in the queue. Later in 25.1 it has made it to the front of the queue, and is run, using the changed handler for 25.1 instead of the original of 24.1. So, we could stop the leak by using different proc names for the handler as well. In that case the event may cause a bgerror, trying to be run with a non-existent handler procedure. I do wonder if we can track enough information in the ref-channel that when it is gone in the thread any outstanding events can be canceled, i.e. by either removing them from the event queue, or just finding and marking them as 'deleted', causing the C level receiver to later discard it quietly when it comes to the head of the queue. Look at ForwardProc (tclIORchan.c), and 'SrcExitProc'. Data structures involved are ForwardingEvent and ForwardingResult Whatever is done to the RChan to handle the situation, the RTrans might need equivalent changes.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"