FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

BUG: Avoid unsafe fork in threaded process pools by basnijholt · Pull Request #958 · pipefunc/pipefunc · GitHub

BUG: Avoid unsafe fork in threaded process pools - #958

Merged
basnijholt merged 2 commits into
mainfrom
fix/run-status-ci-flakes
Jun 8, 2026
Merged

BUG: Avoid unsafe fork in threaded process pools#958
basnijholt merged 2 commits into
mainfrom
fix/run-status-ci-flakes

Conversation

Copy link
Copy Markdown
Collaborator

Summary

  • Avoid default process-pool fork when the parent process already has multiple threads, using forkserver/spawn where available.
  • Make the heartbeat active-function test deterministic by blocking slow_square until observed.
  • Reuse the safe process-pool factory in the memory-storage parallel test.

Test Plan

  • uv run pytest tests/test_run_status_cli.py::test_status_from_run_folder_uses_heartbeat_by_default
  • uv run pytest tests/map/test_map.py::test_default_process_pool_executor_avoids_fork_when_threads_exist
  • uv run pytest 'tests/map/test_map.py::test_parallel_memory_storage[dict]'\n- uvx nox -e pytest_min_deps-3.13 -v\n- uvx nox -e pytest_all_deps-3.12 -v\n- uv run pre-commit run --all-files

codecov Bot commented Jun 8, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pipefunc/map/_run.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codspeed-hq Bot commented Jun 8, 2026
edited
Loading

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing fix/run-status-ci-flakes (da30b33) with main (c995d29)

basnijholt changed the title fix: stabilize CI process and heartbeat tests BUG: Avoid unsafe fork in threaded process pools Jun 8, 2026

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR has been updated to match the correct format. Thank you!

basnijholt merged commit 5873869 into main Jun 8, 2026
21 of 22 checks passed
basnijholt deleted the fix/run-status-ci-flakes branch June 8, 2026 21:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL