Skip to content

Conversation

wiggin15
Copy link
Contributor

@wiggin15 wiggin15 commented May 20, 2024

Thread safety in count_next. count_next has two modes. slow mode (obj->cnt set to PY_SSIZE_T_MAX), which now uses the object mutex (only if GIL is disabled) and fast mode, which is either simple cnt++ if GIL is enabled, or uses atomic_compare_exchange if GIL is disabled.

Thread safety in count_next. count_next has two modes. slow mode
(obj->cnt set to PY_SSIZE_T_MAX), which now uses the object mutex
(only if GIL is disabled) and fast mode, which is either simple
cnt++  if GIL is enabled, or uses atomic_compare_exchange if
GIL is disabled.
@wiggin15 wiggin15 requested a review from rhettinger as a code owner May 20, 2024 20:42
@ghost
Copy link

ghost commented May 20, 2024

The following commit authors need to sign the Contributor License Agreement:

Click the button to sign:
CLA not signed

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.

2 participants