(
        self,
        func: Callable[..., Awaitable[R]],
        args: Sequence[Any] = None,
        kwds: Dict[str, Any] = None,
    )
return results[0]
Run a single coroutine on the pool.
Run a single coroutine on the pool.
Run a single coroutine on the pool .
async def apply(
        self,
        func: Callable[..., Awaitable[R]],
        args: Sequence[Any] = None,
        kwds: Dict[str, Any] = None,
    ) -> R:
        """Run a single coroutine on the pool."""
        if not self.running:
            raise RuntimeError("pool is closed")

        args = args or ()
        kwds = kwds or {}

        tid = self.queue_work(func, args, kwds)
        results: Sequence[R] = await self.results([tid])
        return results[0]
async def apply ( self , func : Callable [ ... , Awaitable [ R ] ] , args : Sequence [ Any ] = None , kwds : Dict [ str , Any ] = None , ) -> R : if not self . running : raise RuntimeError ( "pool is closed" ) args = args or ( ) kwds = kwds or { } tid = self . queue_work ( func , args , kwds ) results : Sequence [ R ] = await self . results ( [ tid ] ) return results [ 0 ]