Overview
| Artifact ID: | dc396dc1eb10075bc12fd9100f298f5ffb4f59c6 |
|---|---|
| Ticket: | 8bd13f07bde6fb0631f27927e36461fdefe8ca95
Closing tcl pipes prevents windows threads from starting up |
| User & Date: | sebres on 2017-05-03 19:11:22 |
Changes
- icomment:
So bug "R6016" occurs currently on exit of tclsh if some pipe-workers are still alive (in shutdown process), but the main-thread exited before it happens. In this case 8.6/trunk (with fix-1997007) may be affected also, if someone uses tcl.dll with own or rewritten TclMain, where exit occurs faster). Just currently not reproduceable, because tcl finalization is a little bit slower there. So Jan, you were right with the "vague fears" :) The possible solution (that would be too complex just for this case): - create pool of pipe-workers (for the case if pipe-worker receives PTI_STATE_STOP signal and shutdown asynchronously); - in case that the pipe-thread is not down, add worker to this pool; - create thread exit-handler (on main thread) that will definitively shutdown all pending workers (waiting for down and/or terminate pipe-worker if it still alive). Another possible solution: calling TerminateProcess implicit before ExitProcess. It works, but I don't like it also. Thinking about better handling to realize proper shutdown of workers (in exit case). WiP
- login: "sebres"
- mimetype: "text/plain"