Feature Request: Documentation should clarify Python read access thread-safety #12817
Replies: 2 comments 4 replies
-
Any parallel query execution on a single connection will break. Only one query execution can be active at a time on a given connection. |
Beta Was this translation helpful? Give feedback.
-
I've just been writing some code where I was I changed to doing a |
Beta Was this translation helpful? Give feedback.
-
Python client API documentation states that the
DuckDBPyConnection
object is not thread-safe and therefore a cursor should be created for parallel writes.Documentation should clarify expected read behaviour. For example, if multiple threads are using the same
DuckDBPyConnection
object to read data does this also need special handling?I'm happy to create a PR for documentation updates if necessary, but first I would need someone to tell me how DuckDB behaves in this scenario. Unfortunately I don't know enough C to check for myself.
Beta Was this translation helpful? Give feedback.
All reactions