Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 08e631066d32cd5268ce4638bcf1a0ba38a10e77
Ticket: 2005794fffffffffffffffffffffffffffffffff
tpool::create freezes when using minworkers
User & Date: ferrieux on 2008-10-22 05:48:50
Changes

  1. icomment:
    Hey, after checking the C code in threadPoolCmd.c, I can witness the logic is exactly the same. And the same flaw is there:
    
        for (ii = 0; ii < tpoolPtr->minWorkers; ii++) {
            if (CreateWorker(interp, tpoolPtr) != TCL_OK) {
     
    outside any mutex, but CreateWorker is documented as:
    
          Assumes the caller ho(l)ds the pool mutex.
    
    So it seems it lacks a pair of 
    
          Tcl_MutexLock/Unlock(&tpoolPtr->mutex);
    
    around the loop (but possibly around the whole creation routine. I need Zoran's help here ;-)
    
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"