Does the os.sched_yield() release the GIL?

I’ve asked a question on SO, but no answer leads to digging further.
I couldn’t find the instruction that releases the GIL in the os.sched_yield() implementation.

Please check the link below for more info:

Final question: does the os.sched_yield() release the GIL?

Looking at the source in posixmodule.c I’d say: No, os.sched_yield does not release the GIL.

I don’t know why it doesn’t release the GIL. Could you create an issue for this on GitHub, and if you’re up for it a pull request as well?


Thank you for checking this. I’ll create an issue but I’m not experienced enough to make a PR.

EDIT: Related issue