merge experimental-connectors

This commit is contained in:
Kevin Jahns
2018-10-08 17:08:20 +02:00
committed by Kevin
41 changed files with 2047 additions and 2929 deletions

View File

@@ -1,4 +1,3 @@
// TODO: rename mutex
/**
@@ -19,7 +18,7 @@
*/
export function createMutualExclude () {
var token = true
return function mutualExclude (f) {
return function mutualExclude (f, g) {
if (token) {
token = false
try {
@@ -28,6 +27,8 @@ export function createMutualExclude () {
console.error(e)
}
token = true
} else if (g !== undefined) {
g()
}
}
}