Call a remote method and return a Future. Args: name: Method name to call *args: Positional arguments **kwargs: Keyword arguments Returns: A Future object that can be used to retrieve the result
(self, name: str, *args,
**kwargs)
| 539 | return result |
| 540 | |
| 541 | def _call_future(self, name: str, *args, |
| 542 | **kwargs) -> concurrent.futures.Future: |
| 543 | """ |
| 544 | Call a remote method and return a Future. |
| 545 | |
| 546 | Args: |
| 547 | name: Method name to call |
| 548 | *args: Positional arguments |
| 549 | **kwargs: Keyword arguments |
| 550 | |
| 551 | Returns: |
| 552 | A Future object that can be used to retrieve the result |
| 553 | """ |
| 554 | nvtx_mark_debug(f"RPC.future.{name}", color="blue", category="RPC") |
| 555 | |
| 556 | def _async_to_sync(): |
| 557 | future = asyncio.run_coroutine_threadsafe( |
| 558 | self._call_async(name, *args, **kwargs), self._loop) |
| 559 | return future.result() |
| 560 | |
| 561 | return self._executor.submit(_async_to_sync) |
| 562 | |
| 563 | async def _call_streaming(self, name: str, *args, |
| 564 | **kwargs) -> AsyncIterator[Any]: |
nothing calls this directly
no test coverage detected