Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 572039ff526360c46a89b0cf80e1dc165f9b3de2
Ticket: 2835615fffffffffffffffffffffffffffffffff
Pool suspend/resume feature
User & Date: hathawa on 2009-08-19 21:07:19
Changes

  1. icomment:
    Zoran, thanks for your reply. I thought it would be trivial to do and handy to have.
    I'm working on a visualization problem that can be broken up into about 50 equal chunks. The total jobs take about 4 hours on a slow machine and about 20 minutes on an 8-core machine using your thread package. I keep a progress bar going so that I can report "n of 50 completed". The natural and easy way of doing this is to do 50 posts (setup time is quick for my problem) and then sit in a wait loop, get the output of each chuck, print some messages, and update the progress bar. This doesn't really work since before the post loop can complete the tasks grab all the cores. As each task finishes, its output get queued, since I have not entered the wait loop yet. Eventually everything completes; however, the progress is not reported in a smooth manner.  I have solved my problem with creating a queue and posting from that until the pool is filled and when a task completes posting another job. This is just a pain. It would be a similar case for mutexes.  You end up managing the threads; instead of letting the threadpool do it for you. Thanks.
    
    Barry
    
    
  2. login: "hathawa"
  3. mimetype: "text/plain"
  4. username: "hathawa"