Skip to content

Commit

Permalink
Remove pair_list_global_version mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou authored and bdraco committed Oct 17, 2024
1 parent fe141b4 commit b302ec3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions multidict/_multilib/pair_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,8 @@ typedef struct pair_list {
* It is incremented each time that a dictionary is created and each
* time that a dictionary is modified. */
static uint64_t pair_list_global_version = 0;
#ifdef Py_GIL_DISABLED
static PyMutex global_version_mutex;
#endif

#ifdef Py_GIL_DISABLED
static inline
uint64_t NEXT_VERSION(void)
{
PyMutex_Lock(&global_version_mutex);
++pair_list_global_version;
PyMutex_Unlock(&global_version_mutex);
return pair_list_global_version;
}
#else
#define NEXT_VERSION() (++pair_list_global_version)
#endif


static inline int
Expand Down

0 comments on commit b302ec3

Please sign in to comment.