示例#1
0
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
示例#2
0
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
示例#3
0
 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
示例#4
0
 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
示例#5
0
def _close_parallel():
    from utool import util_parallel
    util_parallel.close_pool(terminate=True)