Skip to content

Make ctrl-c interrupt threading.Lock.acquire() on Windows #125541

Closed
@colesbury

Description

@colesbury

Feature or enhancement

Since Python 3.2, pressing ctrl-c (SIGINT) interrupts threading.Lock.acquire() on POSIX platforms, including Linux and macOS. However, this does not work on Windows.

Now that threading.Lock and threading.RLock use PyMutex and _PyRecursiveMutex internally, this should be a lot easier to implement efficiently.

See also #125058

cc @pitrou @zooba @gpshead

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions