Closed owenpearson closed 11 months ago
➤ Automation for Jira commented:
The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3862
unasync
requires use of setup.py
file. Alternative way to do it in poetry itself -> https://stackoverflow.com/questions/60073711/how-to-build-c-extensions-via-poetry
Link to internal conv - https://ably-real-time.slack.com/archives/C030C5YLY/p1695733725858389 Low level asynios eventloop apis -> https://docs.python.org/3.7/library/asyncio-eventloop.html High level task and coroutines build on top of asyncio eventloop -> https://docs.python.org/3.7/library/asyncio-task.html#asyncio.run
Related links -
run_until_complete
=>
https://gist.github.com/phizaz/20c36c6734878c6ec053245a477572ec
https://www.joeltok.com/posts/2021-02-python-async-sync/
run_coroutine_threadsafe
=>
https://github.com/xloem/async_to_sync/blob/master/async_to_sync/__init__.py
https://bbc.github.io/cloudfit-public-docs/asyncio/asyncio-part-5.html from https://bbc.github.io/cloudfit-public-docs/
Use of multithreading for sync
variant APIs will be avoided as per https://github.com/ably/ably-python/issues/534. There's an explicit requirement in the spec to use shared active fallback for HTTP requests, so the use of multithreading will create an overhead to manage active fallback ( same question raised at https://github.com/ably/ably-python/issues/531#issue-1901588285)
Update documentation as a part of -> https://github.com/ably/ably-python/issues/530
There's one more unasync
implementation -> https://github.com/alex-sherman/unsync.
Checking usage for the same.
Create a synchronous API variant so that users upgrading from <= 1.1 can do so without having to use the newer asyncio APIs.