Closed delphinus closed 6 months ago
This is achieved by #143.
Ah, it's incomplete. Open it.
We should introduce the only thread to access DB (save & load) by mpsc (multi producer and single consumer model).
luv seems to provide either a new thread we can't communicate with or a thread pool we can communicate with
so it looks like it should be addressed with an API outside of luv... perhaps a two-way communication with an unix socket?
I tried threading (not coroutines) to separate the logic to save/load DB, but it needs rewriting almost all logic because the current code depends on plenary.async
module a lot.
Instead of that, I have written code to access DB more lazily in #180. That makes it postpone DB initialization until the first time :Telescope frecency
is called. And load()
/save()
themselves are called in a separated coroutine not to affect the main loop.
I think it is enough for this issue. Closing.
ref #130