TABLE OF CONTENTS


::pwtk::tpool

DESCRIPTION

A class for creating and managing thread-pools.

The class consists of three methods: constructor, job, and wait. The first is used to create a thread-pool, the second to submit jobs, and the last for waiting for all jobs to finish.

For further details, see: tpool::constructor.

EXAMPLE

    set tp [::pwtk::tpool new -b 10]

    foreach i [seq 1 100] {
       $tp job {
           ::pwtk::run_fromXSF pw.x structure-$i.xsf
       }
    }

    $tp wait

    # now we can process all the results

    ...