Skip to content

Support configuring the multiprocessing context #3758

Closed

Description

@itamarst

multiprocessing supports different context, with different tradeoffs. Currently Dask only allows setting a custom global pool. This causes some problems:

  1. It's not possible to use a different context with multiple pools: users are forced to use a single global pool if they want to use a different context.
  2. It impedes changing the default context (see followup issue Default multiprocessing context is broken and should never be used #3759).

Solution: support setting a multiprocessing context in the configuration, instead of just defaulting to the default fork context.

Activity

  1. itamarst commented on Jul 14, 2018

    @itamarst
    ContributorAuthor

    Going to start on this during the sprint.

  2. mrocklin commented on Jul 14, 2018

    @mrocklin
    Member
  3. mrocklin commented on Jul 14, 2018

    @mrocklin
    Member
  4. itamarst commented on Jul 14, 2018

    @itamarst
    ContributorAuthor

    Bit tricky in that one needs to create compatible Lock/Queue/etc. from the same context object, so need to figure out how to ensure that happens.

  5. jakirkham commented on Jul 16, 2018

    @jakirkham
    Member

    Would you be able to comment more on your motivating use case?

  6. mrocklin commented on Jul 16, 2018

    @mrocklin
    Member

    @itamarst would like to move our default from fork to spawn. This is a lightweight step in that direction.

  7. itamarst commented on Jul 16, 2018

    @itamarst
    ContributorAuthor

    @jakirkham in particular see #3759.

  8. jakirkham commented on Jul 16, 2018

    @jakirkham
    Member

    Hmm...thought our default was forkserver or is that just in Distributed?

  9. itamarst commented on Jul 17, 2018

    @itamarst
    ContributorAuthor

    In non-Distributed the default is the Python default, which on POSIX is the broken fork.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions