Skip to content

The os.sched_yield() implementation in posixmodule.c doesn't release the GIL #96078

Closed
@FilipDepta

Description

@FilipDepta

I've reviewed the main branch and the GIL isn't released: https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L7060

The forum thread: https://discuss.python.org/t/does-the-os-sched-yield-release-the-gil/18301

Expected: The GIL is released before sched_yield() and acquired after that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixesextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions