Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5c15e9e0540f21a859e3c0e97e85a60289afd76c6e05a7dbfb0cd606bcb50e71
Ticket: 87b69745be15c2816574ec415dfe2c3c407cc5d6
interp creation resets encoding directory search path
User & Date: apnadkarni on 2025-08-13 17:28:33
Changes

  1. icomment:
    @sebres, I am not in agreement with your mods.
    
    First, as I mentioned in the core mailing list, Tcl mutexes are recursive as far as I can tell.
    
    Second, I do not like the comparison of systemEncoding outside of holding the mutex. Globals shared between threads should be accessed under a lock even when reading. While I could probably create a case where that comparison of defaultEncoding and systemEncoding is a race condition, as a matter of principle the safer route is always accessing under a lock instead of proving it is safe.
    
    In fact, looking at the management of systemEncoding without locks led me to create this (unrelated) [ticket](https://core.tcl-lang.org/tcl/tktview/2570123b63) about whether more fixes related to systemEncoding synchronization are needed.
    
    Of course, things are different if Tcl mutexes are not recursive and I misunderstood the manpage.
    
  2. login: "apnadkarni"
  3. mimetype: "text/x-markdown"