Класс Faster Counter без использования встроенного замка значения дважды
class Counter(object):
def __init__(self, initval=0):
self.val = multiprocessing.RawValue('i', initval)
self.lock = multiprocessing.Lock()
def increment(self):
with self.lock:
self.val.value += 1
@property
def value(self):
return self.val.value
https://eli.thegreenplace.net/2012/01/04/shared-counter-with -pythons-multiprocessing https://docs.python.org/2/library/multiprocessing.html#multiprocessing.sharedctypes.Value https://docs.python.org /2/library/multiprocessing.html#multiprocessing.sharedctypes.RawValue
Уже найдено решение. Мое отображение пропустило пересечение, оно отображалось правильно