You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAICT, all of the following conditions have to be met:
two (or more) Cache instances that use the same directory
fork before Cache.get()
MacOS
If any of the above is removed, the snippet works are expected.
SQLite threading mode (sqlite3.threadsafety) is set to multi-thread ("Threads may share the module, but not connections"), so I don't think that's causing this because diskcache reconnects on forking already.
I tested your code on Ubuntu 22.04 Python 3.12 x86 and it worked fine. This is (maybe) related to how fork works underneath in Python, though I used the same one:
@ddorian, exactly, this works perfectly on Linux (as everything does, right?). Maybe I wasn't clear enough above, but MacOS is a necessary condition for reproduction.
Running:
on a MacOS machine, fails with:
(tested on CircleCI M1 medium instance)
AFAICT, all of the following conditions have to be met:
Cache
instances that use the same directoryCache.get()
If any of the above is removed, the snippet works are expected.
SQLite threading mode (
sqlite3.threadsafety
) is set to multi-thread ("Threads may share the module, but not connections"), so I don't think that's causing this because diskcache reconnects on forking already.Possibly related to #266.
The text was updated successfully, but these errors were encountered: