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-145230: Update lockbench#145231

Draft
colesbury wants to merge 3 commits intopython:mainfrom
colesbury:gh-145230-lockbench-update
Draft

gh-145230: Update lockbench#145231
colesbury wants to merge 3 commits intopython:mainfrom
colesbury:gh-145230-lockbench-update

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commentedFeb 25, 2026
edited
Loading

Remove PyThread_type_lock (now uses PyMutex internally).

Add new benchmark options:

  • work_inside/work_outside: control work inside and outside the critical section to vary contention levels
  • num_locks: use multiple independent locks with threads assigned round-robin
  • total_iters: fixed iteration count per thread instead of time-based, useful for measuring fairness
  • num_acquisitions: lock acquisitions per loop iteration
  • random_locks: acquire random lock each iteration

Also return elapsed time from benchmark_locks() and switch lockbench.py to use argparse.

Remove PyThread_type_lock (now uses PyMutex internally).Add new benchmark options:- work_inside/work_outside: control work inside and outside the  critical section to vary contention levels- num_locks: use multiple independent locks with threads assigned  round-robin- total_iters: fixed iteration count per thread instead of time-based,  useful for measuring fairness- num_acquisitions: lock acquisitions per loop iterationAlso return elapsed time from benchmark_locks() and switch lockbench.pyto use argparse.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@colesbury

[8]ページ先頭

©2009-2026 Movatter.jp