GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Some multiprocessing APIs should be possible to import or use even when multiprocessing itself isn't available · Issue #134634 · python/cpython

Some multiprocessing APIs should be possible to import or use even when multiprocessing itself isn't available #134634

New issue
Copy link
New issue
Copy link
Open
Open
Some multiprocessing APIs should be possible to import or use even when multiprocessing itself isn't available#134634
Copy link
Labels
OS-androidOS-iostype-featureA feature request or enhancementA feature request or enhancement

Description

@mhsmith
mhsmith
opened on May 24, 2025
Issue body actions

Bug report

Bug description:

Android doesn't support multiprocessing because it doesn't support the System V IPC API, and iOS doesn't support subprocesses at all. However, there are a couple of things that should still work on these platforms, but currently don't:

  • multiprocessing.dummy.Pool (aka multiprocessing.pool.ThreadPool) currently depends on the multiprocessing synchronization primitives, when it could use the threading equivalents instead.

  • multiprocessing.synchronize throws an exception on import if the synchronization primitives are unavailable. But this breaks some packages like joblib, which imports the primitives but doesn't always use them (joblib/joblib#825).

Chaquopy has some monkey patches to work around these issues, but it would be better if they were fixed upstream.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

  • gh-134634: Use a pipe instead of a queue for Pool's change notifier #148050

Activity

  1. mhsmith
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    OS-ios
    OS-android
    on May 24, 2025
  2. terryjreedy
    added
    type-featureA feature request or enhancementA feature request or enhancement
    and removed
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on May 24, 2025
  3. terryjreedy commented on May 24, 2025

    @terryjreedy
    terryjreedy
    on May 24, 2025
    Member
    More actions

    (EDIT) I have no idea is these changed would be acceptible. In any case, we cannot/will-not grab other people's code. Someone with 'ownership' of chaquopy would have to sign our Contributor Licensing Agreement and submit a PR with their code. Or someone else (you?) would have to write new code that does not violate their copyright.

  4. freakboy3742 commented on May 25, 2025

    @freakboy3742
    freakboy3742
    on May 25, 2025
    Contributor
    More actions

    @terryjreedy FTR: @mhsmith is the founder and principal author of Chaquopy.

  5. mhsmith commented on May 25, 2025

    @mhsmith
    mhsmith
    on May 25, 2025
    MemberAuthor
    More actions

    Yes, I've already signed the CLA, and, if the fact that it's MIT licensed isn't already sufficient, I hereby give permission for anyone to contribute Chaquopy code to CPython.

    However, a proper upstream solution will probably look a bit different to the monkey patches. I only linked to them to demonstrate that this could be fixed with a relatively small change.

  6. serhiy-storchaka commented on Apr 4, 2026

    @serhiy-storchaka
    serhiy-storchaka
    on Apr 4, 2026
    Member
    More actions

    I agree that ThreadPool should not depend on shared memory and other IPC. But solution proposed in #148050 while simple, looks heavyweight to me. ThreadPool should not need opening named pipes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-androidOS-iostype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.