Skip to content

Cross-interpreter support for efficient sharing of frozendicts #148234

@a-reich

Description

@a-reich

Feature or enhancement

Proposal:

The concurrent.interpreters module for subinterpreters handles sharing/sending values across interpreters with direct sharing of some basic immutable types, and a fallback to pickling others. As an immutable container, tuples are supported (as long as all items are themselves shareable). Similarly, I think it would be good to support sharing frozendict without serialization (if keys & values are shareable).

Because dictionaries are so fundamental and common, having a better and more performant way to share such a mapping would significantly improve the experience of using concurrent.interpreters and InterpreterPoolExecutor.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions