Skip to content

Threads, locks and fork() #9

Description

@pelme

I ran into issues with the approach used in celerytest:

Launching a celery worker in a new thread, which then forks of new processes causes problems. This happens because there might be locks held in other threads when celery fork()s. This happens commonly if the logging module is used since it uses thread locks. Mixing threads, thread locks and fork()s turns out to be a bad idea and unreliable: http://bugs.python.org/issue6721

I now instead start a celery worker by just launching a celery worker in a subprocess, which seems to work reliable.

Activity

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