Skip to content

Commit

Permalink
await to_thread in connection
Browse files Browse the repository at this point in the history
  • Loading branch information
ajshedivy committed Sep 9, 2024
1 parent 73a7d6d commit 99cfa43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapepire_python/asyncio/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def executescript(self, script: SQLQuery) -> AsyncCursor:
return await self.execute(script)

async def commit(self) -> None:
to_thread(self._connection.commit)
await to_thread(self._connection.commit)

async def rollback(self) -> None:
to_thread(self._connection.rollback)
await to_thread(self._connection.rollback)

0 comments on commit 99cfa43

Please sign in to comment.