Skip to content

Commit

Permalink
Add furtex locks to collections.deque
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Jun 3, 2016
1 parent 3116ff6 commit b076dc8
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 49 deletions.
10 changes: 10 additions & 0 deletions Include/objimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,16 @@ PyAPI_FUNC(void) PyObject_GC_Del(void *);
} \
} while (0)

#define Py_VISIT_UNLOCK(op, unlockfn, unlockarg) \
do { \
if (op) { \
int vret = visit((PyObject *)(op), arg); \
if (vret) { \
(unlockfn)(unlockarg); \
return vret; \
} \
} \
} while (0)

/* Test if a type supports weak references */
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
Expand Down
Loading

0 comments on commit b076dc8

Please sign in to comment.