Multithreaded Tcl - Mutex Protection
 
 
- First, various shared data had to be protected with mutexes, e.g., from tclUtil.c:
Tcl_PrintDouble(interp, value, dst)
    Tcl_MutexLock(&precisionMutex);
    sprintf(dst, precisionFormat, value);
    Tcl_MutexUnlock(&precisionMutex);