Example #1
0
File: uv.py Project: benoitc/flower
    def __init__(self):
        self.loop = pyuv.Loop()
        self._async = pyuv.Async(self.loop, self._wakeloop)
        self._async.unref()
        self.fds = {}
        self._lock = threading.RLock()
        self.running = False

        # start the server task
        self._runtask = tasklet(self.run, "uv_server")()
Example #2
0
File: uv.py Project: BigRLab/flower
    def __init__(self):
        self.loop = pyuv.Loop()
        self._async = pyuv.Async(self.loop, self._wakeloop)
        self._async.unref()
        self.fds = {}
        self._lock = threading.RLock()
        self.running = False

        # start the server task
        self._runtask = tasklet(self.run, "uv_server")()
Example #3
0
File: uv.py Project: benoitc/flower
    def switch(self):
        if not self.running:
            self._runtask = tasklet(self.run)()

        getcurrent().remove()
        self._runtask.switch()
Example #4
0
File: uv.py Project: BigRLab/flower
    def switch(self):
        if not self.running:
            self._runtask = tasklet(self.run)()

        getcurrent().remove()
        self._runtask.switch()