cloud-sql-python-connector icon indicating copy to clipboard operation
cloud-sql-python-connector copied to clipboard

fix: error on connect_async() event loop mismatch

Open jackwotherspoon opened this issue 8 months ago • 0 comments

Today, the Python Connector for async usage does not allow being called across multiple event loops.

However, we do not explicitly define that logic nor make it clear via an error message.

This PR adds an error message to check in connect_async if the Connector._loop attribute matches the current running event loop and errors if it does not (multiple event loops).

Related to #1107

jackwotherspoon avatar Jun 04 '24 22:06 jackwotherspoon