Comparing version 1.0.1 to 2.0.0
{ | ||
"name": "rwlock", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Read-write lock implementation for Node.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,1 +5,6 @@ ReadWriteLock | ||
Read-write lock for Node. | ||
License | ||
======= | ||
This Node module is released under the MIT License. |
@@ -1,4 +0,5 @@ | ||
/*! ReadWriteLock.js - v1.0.0 - 2013-02-14 | ||
/*! ReadWriteLock.js - v2.0.0 - 2013-02-15 | ||
* Part of the Canvace technology <http://www.canvace.com/> | ||
* Released under the MIT License | ||
* Copyright (c) 2013 Canvace Srl */ | ||
module.exports=function(){"use strict";function n(e,n){var r=function(){var n=!1;return function(){n||(n=!0,t[e].readers--,t[e].queue.length?t[e].queue[0]():delete t[e])}}();e in t?t[e].readers<0||t[e].queue.length?t[e].queue.push(function(){t[e].readers>=0&&(t[e].queue.shift(),t[e].readers++,n(r),t[e].queue.length&&t[e].queue[0]())}):t[e].readers++:(t[e]={readers:1,queue:[]},n(r))}function r(e,n){var r=function(){var n=!1;return function(){n||(n=!0,t[e].readers=0,t[e].queue.length?t[e].queue[0]():delete t[e])}}();e in t?t[e].readers||t[e].queue.length?t[e].queue.push(function(){t[e].readers||(t[e].queue.shift(),t[e].readers=-1,n(r))}):(t[e].readers=-1,n(r)):(t[e]={readers:-1,queue:[]},n(r))}var t={};this.readLock=n,this.writeLock=r,this.criticalSection=function(e,t,n){r(e,function(e){t(),e()},n)}}; | ||
module.exports=function(){"use strict";function n(e,n){var r=function(){var n=!1;return function(){n||(n=!0,t[e].readers--,t[e].queue.length?t[e].queue[0]():delete t[e])}}();e in t?t[e].readers<0||t[e].queue.length?t[e].queue.push(function(){t[e].readers>=0&&(t[e].queue.shift(),t[e].readers++,n(r),t[e].queue.length&&t[e].queue[0]())}):t[e].readers++:(t[e]={readers:1,queue:[]},n(r))}function r(e,n){var r=function(){var n=!1;return function(){n||(n=!0,t[e].readers=0,t[e].queue.length?t[e].queue[0]():delete t[e])}}();e in t?t[e].readers||t[e].queue.length?t[e].queue.push(function(){t[e].readers||(t[e].queue.shift(),t[e].readers=-1,n(r))}):(t[e].readers=-1,n(r)):(t[e]={readers:-1,queue:[]},n(r))}var t={};this.readLock=n,this.writeLock=r,this.readSection=function(e,t,r){n(e,function(e){t(),e()},r)},this.writeSection=function(e,t,n){r(e,function(e){t(),e()},n)}}; |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
1730
4
10