Table of Contents

Module: multi_thread ../bkchem/oasa/oasa/graph/multi_thread.py
Functions   
run_in_threads
  run_in_threads 
run_in_threads (
        function,
        attrs,
        processes=1,
        group_by=1,
        additional_attrs=None,
        kw_attrs=None,
        )

function is the function to run, attrs a list of attrs for which to run the consecutively the function, additional_attrs and kw_attrs are attrs that are added to each call of function,

group_by means how many attributes should be processed in one thread, this is useful when a single run of the function is too fast and the overhead of starting a thread is too high, it is good to set this value so that a runtime of one group is higher than at least 100ms,

processes is a number of parallel threads that should run.

Classes   

CustomThread


Table of Contents

This document was automatically generated on Tue Dec 12 13:46:44 2006 by HappyDoc version 2.1