-
|
So I was trying to use the indexedDB backend in a document and at the same time in a Service worker, but it seems it can't be done without issues. I had issues after renaming files, also after creating them, no issues when reading already existing files though (I guess those are always pulled from the indexedDB). Any plans to support using multiple contexts at the same time? I only need to use fs.promises.readFile() from the service worker, maybe there is a way to just force reloading the file system state before reading to sync the state with the file system saved on the indexedDB? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hey @davidsm10, it sounds like you want to use a backend with the same underlying data source in multiple threads. Currently the only backend with support for this is Multithreading with the same underlying data source is a very difficult problem. Perhaps if the ECMAScript structs proposal is accepted some official support could be added but until then I don't see multithreaded The |
Beta Was this translation helpful? Give feedback.
-
|
Ok, thanks, I will try the |
Beta Was this translation helpful? Give feedback.
Hey @davidsm10,
it sounds like you want to use a backend with the same underlying data source in multiple threads.
Currently the only backend with support for this is
SingleBuffer.Multithreading with the same underlying data source is a very difficult problem. Perhaps if the ECMAScript structs proposal is accepted some official support could be added but until then I don't see multithreaded
IndexedDBbeing a thing.The
Portbackend is probably what you want, which can be combined withresolveRemoteMountfor use across threads.