Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8a90cb41aa117599918b8d1c7cccefafc31836d638f6fb8b5850e89848254ebd
Ticket: 33b248619922b8781ab500cd778f177fedf3ebe8
zipfs becomes non-functional after first thread finalization
User & Date: apnadkarni on 2023-10-20 17:52:04
Changes

  1. icomment:
    Thinking about it a bit more, I think finalization only on TclInExit() (without explicit bookkeeping of threads) is the right solution in any case. Even after the last current Tcl thread exits, a C application could still create a new thread which would need access to the library mount so it needs to stay in place until process exit.
    
    Then again, as I said, I don't understand Tcl's initialization sequence and the above may not be true.
    
    Perhaps the right approach is to add a "Cleanup" method to the file system implementation dispatch table that gets invoked by Tcl at the "right" time. If zipfs was implemented as an extension the finalization call as currently directly invoked from TclFinalizeIOSubsystem would not be possible.
    
  2. login: "apnadkarni"
  3. mimetype: "text/plain"