Skip to content

Commit 47532c9

Browse files
committed
chore: Expose members of sync client as well
1 parent 310eb68 commit 47532c9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/toolbox-core/src/toolbox_core/sync_client.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
import asyncio
17+
from asyncio import AbstractEventLoop
1718
from threading import Thread
1819
from typing import Any, Callable, Coroutine, Mapping, Optional, Union
1920

@@ -29,7 +30,7 @@ class ToolboxSyncClient:
2930
service endpoint.
3031
"""
3132

32-
__loop: Optional[asyncio.AbstractEventLoop] = None
33+
__loop: Optional[AbstractEventLoop] = None
3334
__thread: Optional[Thread] = None
3435

3536
def __init__(
@@ -61,6 +62,18 @@ async def create_client():
6162
create_client(), self.__class__.__loop
6263
).result()
6364

65+
@property
66+
def _async_client(self) -> ToolboxClient:
67+
return self.__async_client
68+
69+
@property
70+
def _loop(self) -> AbstractEventLoop:
71+
return self.__class__.__loop
72+
73+
@property
74+
def _thread(self) -> Thread:
75+
return self.__class__.__thread
76+
6477
def close(self):
6578
"""
6679
Synchronously closes the underlying client session. Doing so will cause

0 commit comments

Comments
 (0)