def access ( self , accessor , timeout = None ) : if self . loop . is_running ( ) : raise RuntimeError ( "Loop is already running" ) coro = asyncio . wait_for ( accessor , timeout , loop = self . loop ) return self . loop . run_until_complete ( coro )
python3 async only allow one at a time
Return a result from an asyncio future .
def access(self, accessor, timeout=None):
        """Return a result from an asyncio future."""
        if self.loop.is_running():
            raise RuntimeError("Loop is already running")
        coro = asyncio.wait_for(accessor, timeout, loop=self.loop)
        return self.loop.run_until_complete(coro)