fix lock not taken reading _total_bytes
@@ -1081,6 +1081,7 @@ cdef class SingleDeviceMemoryPool:
return size
cpdef size_t total_bytes(self):
+ with LockAndNoGc(self._total_bytes_lock):
return self._total_bytes
cpdef set_limit(self, size=None, fraction=None):
