function writeLockFile(path, data, cb) { // Like fs.writeFile within a lock.
    lock(path, function (unlock) {
        fse.writeFile(path, data, function (e, d) { unlock(); cb(e, d); });
    });
}
function writeLockFile(path, data, cb) { 
    lock(path, function (unlock) {
        fse.writeFile(path, data, function (e, d) { unlock(); cb(e, d); });
    });
}
function writeLockFile ( path , data , cb ) { // Like fs.writeFile within a lock. lock ( path , function ( unlock ) { fse . writeFile ( path , data , function ( e , d ) { unlock ( ) ; cb ( e , d ) ; } ) ; } ) ; }
Should we consider using the operating system's synchronization or exclusivity utilities instead of our own locks?
Should we consider using the operating system s synchronization or exclusivity utilities instead of our own locks?