Skip to content

Commit 1b3e242

Browse files
committed
Adding catch for pyodide not having multiprocessing
Seeing if this enables try hamilton to run the latest hamilton code.
1 parent 6475418 commit 1b3e242

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

hamilton/execution/executors.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
import dataclasses
33
import functools
44
import logging
5-
from concurrent.futures import Executor, Future, ProcessPoolExecutor, ThreadPoolExecutor
5+
6+
try:
7+
from concurrent.futures.process import ProcessPoolExecutor
8+
except ModuleNotFoundError:
9+
ProcessPoolExecutor = None
10+
from concurrent.futures import Executor, Future, ThreadPoolExecutor
611
from typing import Any, Callable, Dict, List
712

813
from hamilton import node

0 commit comments

Comments
 (0)