mafintosh / mafintosh/fd-lock

Expose some way of asynchronous blocking lock

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
40
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Is there a way to make lock blocking, or at least asynchronously blocking?

So one could do:

```
await lock(fd, timeout)
```

Seems like there are 3 possible situations:

1. Don't block at all, return false
2. Block for a certain amount of time like ms
3. Block forever

Would this require some C++ changes?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the existing lock API and how it handles file descriptors, then assess whether `await lock(fd, timeout)` can support the three requested blocking modes. Clarify the timeout semantics and whether C++ changes are required; done requires an agreed implementation scope and tests for each mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.