Skip to content
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

Exposing xCheckReservedLock and xSleep to the VFS implementation #243

Open
fabiospampinato opened this issue Aug 20, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@fabiospampinato
Copy link

fabiospampinato commented Aug 20, 2023

I'm currently writing a VFS for Node, and I see that xCheckReservedLock and xSleep are basically no-ops in vfs.c, so I can't quite implement them in vfs.js.

I think it would be better to expose these at the vfs.js level, and making them no-ops there instead.

The idea is that in some scenarios they could be implemented (with Atomics.wait for example, or a native node module), and implementing them to my understanding could be beneficial (if a file is locked already then I think sqlite will sleep for a bit and check again, which seems better than always blocking when trying to get a lock).

@dyedgreen dyedgreen added the enhancement New feature or request label Aug 21, 2023
@dyedgreen
Copy link
Owner

Implementing this might address #249

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants