posix-semaphore:阻止 Node.js 的 POSIX 信号量

时间:2021-05-30 12:05:23
【文件属性】:
文件名称:posix-semaphore:阻止 Node.js 的 POSIX 信号量
文件大小:13KB
文件格式:ZIP
更新时间:2021-05-30 12:05:23
JavaScript posix信号量 安装 npm install posix-semaphore 例子 const Semaphore = require ( 'posix-semaphore' ) const sem = new Semaphore ( 'mySemaphore' ) sem . acquire ( ) /* my code using shared ressources :smiling_face_with_sunglasses: */ sem . release ( ) // other processes are now free to use the ressources // remove the semaphore from the system sem . close ( ) 进程间通信示例 const cluster = require ( 'cluster' ) const Semaphore = require ( 'p
【文件预览】:
posix-semaphore-master
----.gitignore(19B)
----package.json(509B)
----.travis.yml(154B)
----srcs()
--------semaphore.h(900B)
--------addon.js(2KB)
--------addon.cc(146B)
--------addon_11+.cc(94B)
--------semaphore.cc(6KB)
----LICENSE(1KB)
----README.md(3KB)
----tests()
--------test1.js(187B)
--------launch_tests.js(2KB)
--------test3.js(173B)
--------test4.js(119B)
--------test5.js(92B)
--------test8.js(1KB)
--------test9.js(308B)
--------test2.js(210B)
--------test6.js(299B)
--------test7.js(562B)
--------test_processes.js(2KB)
----binding.gyp(493B)
----.gitattributes(45B)

网友评论