Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 57ce9121afc625c59c75f8ea1628300dc6819a66
Ticket: 3382401fffffffffffffffffffffffffffffffff
Thread pool leaks memory
User & Date: techentin on 2012-11-27 00:40:29
Changes

  1. icomment:
    I see the same memory leak with Tcl 8.5.13 and Thread 2.6.7 on Linux.
    
    It looks to me like the resource leak is related to the thread pool maintaining information on completed jobs.  
    
    I inserted periodic calls to tpool::wait and tpool::get inside the loop that posts work to the thread pool, and observed reduced memory growth.  (About half)  If I call tpool::get twice on the same job, I get "no such job," so I presume that it cleans up some resources.  But I don't see anything explicit in the API to discard results from completed jobs. 
    
    When I changed the post option from -nowait to -detached, the memory leak went away.
    
    
    Bob
    
    
  2. login: "techentin"
  3. mimetype: "text/plain"
  4. username: "techentin"