-
Notifications
You must be signed in to change notification settings - Fork 130
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
Fails in multiprocessing even with 'r' mode #86
Comments
@Jwink3101 thanks for the report, can you add a code example that reproduces your issue + maybe some tip about fixing if you have it. |
It was a long time ago that I figured it out but I seem to recall it was the thread for queuing the SQLite operations. That didn’t work properly in multiprocessing. I pulled it out and it worked but I assume there was a more important use case envisioned for having the threading. (Avoiding lockouts presumably)
… On Jan 16, 2019, at 8:54 PM, Ivan Menshikh ***@***.***> wrote:
@Jwink3101 thanks for the report, can you add a code example that reproduces your issue + maybe some tip about fixing if you have it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes, multiprocessing affects threads. AFAIK only the main thread remains running in a forked process. Not sure this is a bug; it definitely has nothing to do with OTOH, SqliteDict seeks to prevent multithreading issues with plain Sqlite ( |
As one would expect with a normal dictionary, it cannot be used (easily) with multiprocessing for writing values. However, a normal diction can be used for reading.
sqlitedict fails even with
flag='r'
in multiprocessing. This is almost certainly due to the threaded connection, but that connection is not needed forflag='r'
since you can concurrently read an sqlite file.Is not too hard to fix, but would add a major change in code flow
The text was updated successfully, but these errors were encountered: