diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-01-06 10:46:29 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2021-01-07 21:40:48 +0000 |
commit | 97cb27777aff9797c16271022f104f39c38f2418 (patch) | |
tree | 08a63729242674a559a4a6d3b90da37b57bd6507 /lib/sqlalchemy/ext/asyncio/engine.py | |
parent | b45aa7c4062bafae23286c3069571c2596aabc66 (diff) | |
download | sqlalchemy-97cb27777aff9797c16271022f104f39c38f2418.tar.gz |
Improve ``run_sync`` documentation in asyncio ext
Change-Id: I202458ab6d81e29053118c9fb9c205b865c8d2ba
Ref: #5817
Diffstat (limited to 'lib/sqlalchemy/ext/asyncio/engine.py')
-rw-r--r-- | lib/sqlalchemy/ext/asyncio/engine.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sqlalchemy/ext/asyncio/engine.py b/lib/sqlalchemy/ext/asyncio/engine.py index 5951abc1e..829e89b71 100644 --- a/lib/sqlalchemy/ext/asyncio/engine.py +++ b/lib/sqlalchemy/ext/asyncio/engine.py @@ -448,6 +448,16 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): with async_engine.begin() as conn: await conn.run_sync(metadata.create_all) + .. note:: + + The provided callable is invoked inline within the asyncio event + loop, and will block on traditional IO calls. IO within this + callable should only call into SQLAlchemy's asyncio database + APIs which will be properly adapted to the greenlet context. + + .. seealso:: + + :ref:`session_run_sync` """ conn = self._sync_connection() |