Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-127081: add critical sections todbm objects#132749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
corona10 merged 3 commits intopython:mainfromduaneg:gh-127081-dbm
May 14, 2025

Conversation

duaneg
Copy link
Contributor

@duanegduaneg commentedApr 20, 2025
edited by bedevere-appbot
Loading

The dbm_* functions are not thread-safe, naturally. Add critical sections to protect their use.

The dbm_* functions are not thread-safe, naturally. Add critical sections toprotect their use.
@picnixzpicnixz changed the titlegh-127081: add critical sections to dbm objectsgh-127081: add critical sections todbm objectsApr 20, 2025
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

In general, it's easier to addlock_held variations of functions instead of adding inline critical sections withgoto. For example:

staticintdbm_something_lock_held(PyObject*self){/* ... */}staticintdbm_something(PyObject*self){intresult;Py_BEGIN_CRITICAL_SECTION(self);result=dbm_something_lock_held(self);Py_END_CRITICAL_SECTION();returnresult;}

Would you mind switching over to that pattern here?

@duaneg
Copy link
ContributorAuthor

In general, it's easier to addlock_held variations of functions instead of adding inline critical sections withgoto.... Would you mind switching over to that pattern here?

For sure, that would be much more robust, thanks!

@corona10corona10 self-assigned thisApr 23, 2025
@corona10
Copy link
Member

Sorry for the delay, I will review during the PyCon sprint.

Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM as well

@corona10
Copy link
Member

스크린샷 2025-05-14 오후 1 47 57

Would you like to update clinic again?

@corona10
Copy link
Member

Oh it's not relatede to dbms.

@corona10corona10 merged commitffaeb3d intopython:mainMay 14, 2025
39 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@corona10corona10corona10 approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchakaserhiy-storchaka is a code owner

Assignees

@corona10corona10

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@duaneg@corona10@ZeroIntensity@kumaraditya303

[8]ページ先頭

©2009-2025 Movatter.jp