forked from Wizcorp/locks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (20 loc) · 645 Bytes
/
index.js
File metadata and controls
27 lines (20 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var Semaphore = require('./lib/Semaphore');
var CondVariable = require('./lib/CondVariable');
var Mutex = require('./lib/Mutex');
var ReadWriteLock = require('./lib/ReadWriteLock');
exports.Semaphore = Semaphore;
exports.CondVariable = CondVariable;
exports.Mutex = Mutex;
exports.ReadWriteLock = ReadWriteLock;
exports.createCondVariable = function (initialValue) {
return new CondVariable(initialValue);
};
exports.createSemaphore = function (initialCount) {
return new Semaphore(initialCount);
};
exports.createMutex = function () {
return new Mutex();
};
exports.createReadWriteLock = function () {
return new ReadWriteLock();
};