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

Commit0dd1a06

Browse files
committed
Thread safe lock-free iteration
1 parent92abb01 commit0dd1a06

File tree

2 files changed

+299
-36
lines changed

2 files changed

+299
-36
lines changed

‎Include/internal/pycore_dict.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ static inline PyDictUnicodeEntry* DK_UNICODE_ENTRIES(PyDictKeysObject *dk) {
210210
#defineDICT_VERSION_INCREMENT (1 << (DICT_MAX_WATCHERS + DICT_WATCHED_MUTATION_BITS))
211211
#defineDICT_WATCHER_MASK ((1 << DICT_MAX_WATCHERS) - 1)
212212

213+
#defineDICT_VALUES_USED_SIZE(values) ((uint8_t *)values)[-2]
214+
213215
#ifdefPy_GIL_DISABLED
214216
#defineDICT_NEXT_VERSION(INTERP) \
215217
(_Py_atomic_add_uint64(&(INTERP)->dict_state.global_version, DICT_VERSION_INCREMENT) + DICT_VERSION_INCREMENT)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp