Invoke terminate() on a process pool and deal with possible Windows issues.
(pool)
| 1394 | |
| 1395 | |
| 1396 | def 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 | |
| 1408 | def terminate_pool_with_backoff(pool, number_of_trials=3): |
no test coverage detected