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

record-level locking... #35

Open
tracker1 opened this issue Oct 21, 2014 · 3 comments
Open

record-level locking... #35

tracker1 opened this issue Oct 21, 2014 · 3 comments

Comments

@tracker1
Copy link

It would be nice if you can do a record level lock for read/write...

fs.flock(fd, 'sh', function(err){
  fs.flockRead(bytesToRead, function(err, buffer){
    //buffer should be the bytes read after an exclusive lock of that record
    // offset at the current position, for the length of the bytes requested to read.
  });
  fs.flockWrite(buffer, function(err){})
});
@sam-github
Copy link
Contributor

flock doesn't support record level locking: https://linux.die.net/man/2/flock

@baudehlo
Copy link
Owner

baudehlo commented Feb 6, 2019 via email

@sam-github
Copy link
Contributor

Unixen have byte-range locking:

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

No branches or pull requests

3 participants