Skip to content

Protect against race conditions when used concurrently #138

@fingolfin

Description

@fingolfin

It would be nice if PackageManager would protect against race conditions when used concurrently in two processes. That can happen in e.g. automation, when one wants to install a package via PackageManager and by chance this is done concurrently two times.

This can work, but it can also happen that one or even both installation attempts fail.

Other package managers solve this e.g. via PID (process id) based lock files: before installing a package, a lock is "taken". The first process to do so proceeds; other processes trying to install a package see the lock, and then either abort or (more user friendly) print a message like "waiting for lock" and well, wait for it (possibly only up to a certain time out.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions