]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-113884: Refactor `queue.SimpleQueue` to use a ring buffer to store items (#114259)
authormpage <mpage@meta.com>
Fri, 19 Jan 2024 12:17:51 +0000 (04:17 -0800)
committerGitHub <noreply@github.com>
Fri, 19 Jan 2024 12:17:51 +0000 (12:17 +0000)
commit28eacf27efaa07cb8d9c0c3e9253a07b9012415f
tree51403dbaca8a796378ba2d8823abcd94cdd91b7c
parent05e47202a34e6ae05e699af1083455f5b8b59496
gh-113884: Refactor `queue.SimpleQueue` to use a ring buffer to store items (#114259)

Use a ring buffer instead of a Python list in order to simplify the
process of making queue.SimpleQueue thread-safe in free-threaded
builds. The ring buffer implementation has no places where critical
sections may be released.
Modules/_queuemodule.c