MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / terminate_pool

Function terminate_pool

src/scancode/cli.py:1396–1405  ·  view source on GitHub ↗

Invoke terminate() on a process pool and deal with possible Windows issues.

(pool)

Source from the content-addressed store, hash-verified

1394
1395
1396def terminate_pool(pool):
1397 """
1398 Invoke terminate() on a process pool and deal with possible Windows issues.
1399 """
1400 if not pool:
1401 return
1402 if on_windows:
1403 terminate_pool_with_backoff(pool)
1404 else:
1405 pool.terminate()
1406
1407
1408def terminate_pool_with_backoff(pool, number_of_trials=3):

Callers 1

scan_codebaseFunction · 0.85

Calls 1

Tested by

no test coverage detected