Skip to content

gh-116738: Test resource module on FT Python build - #138504

Merged
kumaraditya303 merged 2 commits into
python:mainfrom
yoney:ft_resource
Sep 11, 2025
Merged

gh-116738: Test resource module on FT Python build#138504
kumaraditya303 merged 2 commits into
python:mainfrom
yoney:ft_resource

Conversation

@yoney

@yoneyyoney commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

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

Comment threadModules/resource.c Outdated
@kumaraditya303
kumaraditya303 merged commit 32e1e06 into python:mainSep 11, 2025
51 checks passed
@miss-islington-app

Copy link
Copy Markdown

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
Copy Markdown

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

@bedevere-appbedevere-appBot 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>
@yoney
yoney deleted the ft_resource branch October 19, 2025 03:03
Sign up for freeto 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

@yoney@kumaraditya303@StanFromIreland