Skip to content

Commit 925c6a6

Browse files
committed
Pin fork start method in frontend for Python 3.14
Python 3.14 changed the multiprocessing default from fork to forkserver on Linux, which pickles the target process. The Frontend's service instances carry pipes and transport state that aren't pickleable, so the previous reliance on fork semantics no longer works out of the box. Force the fork start method at module load to preserve existing behaviour. fork is deprecated upstream and will eventually need a real refactor.
1 parent 51e92a3 commit 925c6a6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/workflows/frontend/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616

1717
basestring = (str, bytes)
1818

19+
# Pin the fork start method: service instances carry pipes and transport
20+
# state that aren't pickleable, so spawn/forkserver (the 3.14+ default on
21+
# Linux) can't serialize them. fork is deprecated upstream and will
22+
# eventually need a real refactor.
23+
multiprocessing.set_start_method("fork", force=True)
24+
1925

2026
class Frontend:
2127
"""The frontend class encapsulates the actual service. It controls the

0 commit comments

Comments
 (0)