|
1 | 1 | from __future__ import annotations
|
2 | 2 |
|
3 | 3 | import abc
|
4 |
| -import contextlib |
5 | 4 | import dataclasses
|
6 | 5 | import json
|
7 | 6 | import logging
|
|
14 | 13 | from typing import TYPE_CHECKING
|
15 | 14 |
|
16 | 15 | import multiprocess # type: ignore
|
17 |
| -import pathos # type: ignore |
18 | 16 | from pyk.cli.utils import file_path
|
19 | 17 | from pyk.cterm import CTerm
|
20 | 18 | from pyk.kast.outer import KApply, KRewrite, KSort, KToken
|
|
45 | 43 |
|
46 | 44 | if TYPE_CHECKING:
|
47 | 45 | from argparse import Namespace
|
48 |
| - from collections.abc import Callable, Iterable, Iterator |
| 46 | + from collections.abc import Callable, Iterable |
49 | 47 | from typing import Any, Final, Mapping, TypeVar
|
50 | 48 |
|
51 | 49 | from pyk.kast.outer import KClaim
|
@@ -189,20 +187,6 @@ def exec_prove_legacy(
|
189 | 187 | raise SystemExit(1)
|
190 | 188 |
|
191 | 189 |
|
192 |
| -class ZeroProcessPool: |
193 |
| - def map(self, f: Callable[[Any], Any], xs: list[Any]) -> list[Any]: |
194 |
| - return [f(x) for x in xs] |
195 |
| - |
196 |
| - |
197 |
| -@contextlib.contextmanager |
198 |
| -def wrap_process_pool(workers: int) -> Iterator[ZeroProcessPool | pathos.pools.ProcessPool]: |
199 |
| - if workers <= 1: |
200 |
| - yield ZeroProcessPool() |
201 |
| - else: |
202 |
| - with pathos.pools.ProcessPool(ncpus=workers) as pp: |
203 |
| - yield pp |
204 |
| - |
205 |
| - |
206 | 190 | class TodoQueueTask(abc.ABC):
|
207 | 191 | ...
|
208 | 192 |
|
|
0 commit comments