def _close_parallel(): #if ut.VERBOSE: # print('_close_parallel') try: from utool import util_parallel util_parallel.close_pool(terminate=True) except Exception as ex: import utool as ut ut.printex(ex, 'error closing parallel') raise
def run_parallel_task(num_procs=None): print('run_parallel_task. num_procs=%r' % None) if num_procs is not None: util_parallel.close_pool() util_parallel.init_pool(num_procs) else: num_procs = util_parallel.get_default_numprocs() msg = 'processing tasks in %s' % ('serial' if num_procs == 1 else str(num_procs) + '-parallel') with utool.Timer(msg): result_list = util_parallel.process(pyhesaff.detect_kpts, args_list, hesaff_kwargs) print_test_results(result_list) return result_list
def run_parallel_task(num_procs=None): print('run_parallel_task. num_procs=%r' % None) if num_procs is not None: util_parallel.close_pool() util_parallel.init_pool(num_procs) else: num_procs = util_parallel.get_default_numprocs() msg = 'processing tasks in %s' % ('serial' if num_procs == 1 else str(num_procs) + '-parallel') with utool.Timer(msg): result_list = util_parallel.process(pyhesaff.detect_feats, args_list, hesaff_kwargs) print_test_results(result_list) return result_list
def _close_parallel(): from utool import util_parallel util_parallel.close_pool(terminate=True)