MCPcopy Create free account
hub / github.com/WebAssembly/wabt / RunMultiThreaded

Function RunMultiThreaded

test/run-tests.py:858–875  ·  view source on GitHub ↗
(infos_to_run, status, options, variables)

Source from the content-addressed store, hash-verified

856
857
858def RunMultiThreaded(infos_to_run, status, options, variables):
859 pool = multiprocessing.Pool(options.jobs)
860 try:
861 results = [(info, pool.apply_async(RunTest, (info, options, variables)))
862 for info in infos_to_run]
863 while results:
864 new_results = []
865 for info, result in results:
866 if result.ready():
867 HandleTestResult(status, info, result.get(0), options.rebase)
868 else:
869 new_results.append((info, result))
870 time.sleep(0.01)
871 results = new_results
872 pool.close()
873 finally:
874 pool.terminate()
875 pool.join()
876
877
878def RunSingleThreaded(infos_to_run, status, options, variables):

Callers 1

mainFunction · 0.85

Calls 5

HandleTestResultFunction · 0.85
closeMethod · 0.80
joinMethod · 0.80
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected