Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Поддержка работы в нескольких потоках #1

Open
alikhil opened this issue Jun 16, 2020 · 1 comment
Open

Comments

@alikhil
Copy link

alikhil commented Jun 16, 2020

При использовании тегера из другого потока выбрасывается следующая ошибка:

unhandled exception SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 140736074318784 and this is thread id 123145490354176

Как это можно обойти?

@Koziev
Copy link
Owner

Koziev commented Jun 17, 2020

Привет,
спасибо за сообщение об ошибке.

Как это можно обойти?

Я добавил флаг check_same_thread=False (тут) при открытии коннекта с БД, вроде бы это должно помочь. Попробуйте забрать изменение из репа, проверить. Хотя я не уверен на все 100%, что движ sqlite воспримет несериализованные запросы из разных тредов нормально :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants