feat(native): add prebuilt Node-API flock support
This commit is contained in:
1 parent
7264906f99
commit
d927cbff99
93 files changed
+1904
-551
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Single-process worker replacement for `@deepseek-ai/node-addon-system/flock`.
|
||||
* The JSONL backend's in-process write claim already excludes every writer,
|
||||
* so its kernel-lock request succeeds without acquiring another resource.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Grant the single-process worker's exclusive-lock request immediately.
|
||||
* @param _fd - file descriptor (unused).
|
||||
* @returns an already-fulfilled promise.
|
||||
*/
|
||||
export function tryLockExclusive(_fd: number): Promise<void> {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
/** CommonJS interop marker for the worker module loader. */
|
||||
export const __esModule = true
|
||||
|
||||
/** The native flock API used by the JSONL backend. */
|
||||
export default { tryLockExclusive }
|
||||
Reference in new issue
Block a user