Run a coroutine in the pool Args: coro: Coroutine function to run *args: Arguments to pass to the coroutine **kwargs: Keyword arguments to pass to the coroutine Returns: Result of the coroutine
(self, coro: Callable, *args: Any, **kwargs: Any)
| 182 | return self._semaphore |
| 183 | |
| 184 | async def run(self, coro: Callable, *args: Any, **kwargs: Any) -> Any: |
| 185 | """ |
| 186 | Run a coroutine in the pool |
| 187 | |
| 188 | Args: |
| 189 | coro: Coroutine function to run |
| 190 | *args: Arguments to pass to the coroutine |
| 191 | **kwargs: Keyword arguments to pass to the coroutine |
| 192 | |
| 193 | Returns: |
| 194 | Result of the coroutine |
| 195 | """ |
| 196 | async with self.semaphore: |
| 197 | return await coro(*args, **kwargs) |
| 198 | |
| 199 | def create_task(self, coro: Callable, *args: Any, **kwargs: Any) -> asyncio.Task: |
| 200 | """ |