File size: 303 Bytes
81d747c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from multiprocessing import Value
class SharedCount:
def __init__(self, epoch: int = 0):
self.shared_epoch = Value('i', epoch)
@property
def value(self):
return self.shared_epoch.value
@value.setter
def value(self, epoch):
self.shared_epoch.value = epoch
|