Skip to content

Make default worker_processes 0Β #404

@jeromekelleher

Description

@jeromekelleher

Currently we have a default of 1 worker process, which means that we create a single background process to do encoding. This is a bit pointless really, resulting in some extra memory usage for the tskit backend (as we pickle/copy the tree sequence into the worker) and also hides log output by default (#302)

To implement workers=0 we use the core.SynchronousExecutor which creates Future objects explicitly, which is not recommended in the Python docs. However, we don't seem to have hit any issues with this, so I think the benefits outweigh the risk here and we can set default worker processse to 0 by default.

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