T
T
This_is_MonoliT2022-02-23 16:54:10
Python
This_is_MonoliT, 2022-02-23 16:54:10

What does check_same_thread mean? In python sqlite3?

What does check_same_thread mean?
And what happens if you set False? And vice versa

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2022-02-23
@This_is_MonoliT

By default, check_same_thread is True and only the creating thread may use the connection. If set False, the returned connection may be shared across multiple threads. When using multiple threads with the same connection writing operations should be serialized by the user to avoid data corruption.

https://docs.python.org/3/library/sqlite3.html#sql...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question