Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

        def close_all(map=None, tasks=None, ignore_all=False):
    if map is None:
        map = _SOCKET_MAP
    if tasks is None:
        tasks = _SCHEDULED_TASKS
    for x in list(map.values()):
        try:
            x.close()
        except OSError as err:
            if err.args[0] == EBADF:
                pass
            elif not ignore_all:
                raise
        except _RERAISEABLE_EXC:
            raise
        except Exception:
            if not ignore_all:
                raise
    map.clear()

    for x in tasks:
        try:
            x.cancel()
        except _RERAISEABLE_EXC:
            raise
        except Exception:
            if not ignore_all:
                raise
    del tasks[:]
        


src/a/s/astm-0.5.0/astm/tests/test_asynclib.py   astm(Download)
            try:
                asynclib._SOCKET_MAP = testmap
                asynclib.close_all()
            finally:
                testmap, asynclib._SOCKET_MAP = asynclib._SOCKET_MAP, socketmap
        else:
            asynclib.close_all(testmap)
    def tearDown(self):
        asynclib.close_all()
 
    def test_basic(self):
        d = asynclib.Dispatcher()
    def tearDown(self):
        asynclib.close_all()
 
    @skip
    def test_send(self):
    def setUp(self):
        # remove any unfired scheduled call left behind
        asynclib.close_all()
 
    def scheduler(self, timeout=0.01, count=100):