Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def join(self):
# TODO: convert the "control plane" to use deferreds using Twisted style callbacks
cb, eb = utils.newID(2)
self.app.control[cb] = self.onJoin
self.mantleDomain.Join(cb, eb)
self.app.mainGreenlet = greenlet(self.app.handle)
self.app.mainGreenlet.switch(self.mantleDomain)
def __init__(self):
self.cb, self.eb = utils.newID(2)
self.green = None
# Boy does it hurt me to put this here. canReturn needs to have access to the domain
# for call returns
self.mantleDomain = None
# True if this deferred should inform the core of its types once set
# Only true for calls
self.canReturn = False