Skip to content

Conversation

yoney
Copy link
Contributor

@yoney yoney commented Sep 4, 2025

The resource module appears thread-safe. According to Linux documentation, getrlimit(), setrlimit(), prlimit(), and getrusage() are marked as MT-Safe, and didn’t find any thread-safety issues mentioned for other docs (posix, freebsd).

  • Added a simple test for FT Python build to collect per-thread user time. This is only supported on some systems, like Linux.

cc: @mpage @colesbury @Yhg1s

@kumaraditya303 kumaraditya303 merged commit 32e1e06 into python:main Sep 11, 2025
51 checks passed
@miss-islington-app
Copy link

Thanks @yoney for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 11, 2025
…ee-threading builds (pythonGH-138504)

(cherry picked from commit 32e1e06)

Co-authored-by: Alper <alperyoney@fb.com>
@bedevere-app
Copy link

bedevere-app bot commented Sep 11, 2025

GH-138793 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Sep 11, 2025
kumaraditya303 added a commit that referenced this pull request Oct 7, 2025
…ree-threading builds (GH-138504) (#138793)

gh-116738: add multi-threaded tests for `resource` module on free-threading builds (GH-138504)
(cherry picked from commit 32e1e06)

Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants