【文件属性】:
文件名称:mutex.js:Mutex锁定系统非阻塞的Javascript
文件大小:2KB
文件格式:ZIP
更新时间:2021-05-09 15:08:15
JavaScript
Mutex.js
Mutex锁定系统非阻塞的Javascript
用法
下载该并将其包含在您的html中。
< script src =" js/mutex.js " > </ script >
然后,您只需要创建该类的实例并以这种方式使用它即可。
< script >
var mutex = new Mutex ( ) ;
mutex . lock ( function ( ) {
/* The code to process goes here */
console . log ( 'Processing the code' ) ;
/* When the processing is finished */
mutex . unlock ( ) ;
} ) ;
</ script >
【文件预览】:
mutex.js-master
----README.md(547B)
----mutex.min.js(341B)
----mutex.js(1KB)