def __init__(self, computedGraph, computedValueGateway, sharedStateSynchronizer): self.controlRoot = Control.root( Control.overlayGenerated(lambda: SubscriptionKeys().keys, self.controlForKey_), computedGraph, self) self.computedGraph = computedGraph self.computedValueGateway = computedValueGateway self.sharedStateSynchronizer = sharedStateSynchronizer self.subscriptionGetters = {} self.subscriptionValues = {} self.changedSubscriptions = set()
def __init__(self, computedGraph, computedValueGateway, sharedStateSynchronizer): self.controlRoot = Control.root( Control.overlayGenerated( lambda: SubscriptionKeys().keys, self.controlForKey_ ), computedGraph, self ) self.computedGraph = computedGraph self.computedValueGateway = computedValueGateway self.sharedStateSynchronizer = sharedStateSynchronizer self.subscriptionGetters = {} self.subscriptionValues = {} self.changedSubscriptions = set()
def gen(parent): self.recomputeSubscription_(subscriptionId) return Control.empty()
def controlForKey_(self, subscriptionId): def gen(parent): self.recomputeSubscription_(subscriptionId) return Control.empty() return Control.generated(gen)