We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe. All the apis are not async apis, its sometimes simple to have a normal sync functions.
Describe the solution you'd like Created a async to sync bridge
Describe alternatives you've considered
Additional context
Example:
@attrs.define class AsyncBridge: _event_loop: asyncio.BaseEventLoop = attrs.field(init=False) _thread: threading.Thread = attrs.field(init=False) def __attrs_post_init__(self): self._event_loop = asyncio.new_event_loop() self._thread = threading.Thread(target=self._event_loop.run_forever) self._thread.start() def execute(self, underlying, timeout=None): future = asyncio.run_coroutine_threadsafe(underlying, self._event_loop) return future.result(timeout=timeout) def stop(self): self._event_loop.call_soon_threadsafe(self._event_loop.stop) self._thread.join()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is your feature request related to a problem? Please describe.
All the apis are not async apis, its sometimes simple to have a normal sync functions.
Describe the solution you'd like
Created a async to sync bridge
Describe alternatives you've considered
Additional context
Example:
The text was updated successfully, but these errors were encountered: