Specification
We'd like to investigate creating our own locking library, based off our current usage of fd-lock.
Previously we were using both proper-lockfile and fd-lock in a more conglomerated fashion. Now, we are purely using fd-lock for the Status (our refactored agent lockfile #283) and Session usage (implemented here).
Note the distinction between "locking" here. Here, we're referring to "file locking" (as per the fd prefix). For example, for the Status, we lock this status file to assert that an agent process is currently executing. Conversely, we're using async-mutex for intra-process locking (locking some resource from within a process, as opposed to between processes). Remember that we also have an existing read-write locking implementation that utilises async-mutex.
Our own library should support:
- OS-specific read-write locks
- Native promise API
- Explore the addition of POSIX locks
OS-specific read-write locks should be the initial priority, and should be seen as a basic extension of functionality from fd-lock (we can use this as a source of inspiration to copy from).
Additional context
Tasks
- ...
- ...
- ...
Specification
We'd like to investigate creating our own locking library, based off our current usage of
fd-lock.Previously we were using both
proper-lockfileandfd-lockin a more conglomerated fashion. Now, we are purely usingfd-lockfor theStatus(our refactored agent lockfile #283) andSessionusage (implemented here).Note the distinction between "locking" here. Here, we're referring to "file locking" (as per the
fdprefix). For example, for theStatus, we lock this status file to assert that an agent process is currently executing. Conversely, we're usingasync-mutexfor intra-process locking (locking some resource from within a process, as opposed to between processes). Remember that we also have an existing read-write locking implementation that utilisesasync-mutex.Our own library should support:
OS-specific read-write locks should be the initial priority, and should be seen as a basic extension of functionality from
fd-lock(we can use this as a source of inspiration to copy from).Additional context
Tasks