Skip to content

Commit 714ef07

Browse files
committed
BadMutex: wrap functions in Lua functions.
On the surface, this appears to make things crash less?
1 parent b7c2e23 commit 714ef07

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bad-mutex/BadMutex.moon

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ for path in *libraryPaths
1515
assert success, BM
1616

1717
return {
18-
lock: BM.lock
19-
tryLock: BM.try_lock
20-
unlock: BM.unlock
18+
lock: ->
19+
BM.lock!
20+
21+
tryLock: ->
22+
return BM.try_lock!
23+
24+
unlock: ->
25+
BM.unlock!
2126
}

0 commit comments

Comments
 (0)