cl-sqlite icon indicating copy to clipboard operation
cl-sqlite copied to clipboard

MRU-cache is not thread safe

Open guicho271828 opened this issue 8 years ago • 3 comments

Around here: https://github.com/dmitryvk/cl-sqlite/blob/master/cache.lisp#L24 How I can disable it?

guicho271828 avatar Jul 02 '16 06:07 guicho271828

perhaps I should get a handle from each thread.

guicho271828 avatar Jul 02 '16 07:07 guicho271828

SQLite is itself non thread-safe w.r.t. single database handle (i.e., each thread should open its own handle to the database). So it does not make much sense to make the cache thread-safe. Each thread should open its own database handle.

dmitryvk avatar Jul 02 '16 07:07 dmitryvk

I agree. It worked with multiple database handles. I think giving a brief reference in the doc may be helpful.

guicho271828 avatar Jul 02 '16 09:07 guicho271828