Wizcorp / locks

Mutex locks, Read/Write locks, Condition variables and Semaphores in JavaScript
105 stars 19 forks source link

Allow conditions to be non-functions. #7

Closed ronkorving closed 9 years ago

ronkorving commented 9 years ago

This allows values in Condition Variables to not just be functions, but also strings, numbers, booleans and regular expressions. These are all turned into functions that do literal matching (or in the case of regexp, runs an re.test).

Also added unit tests for Condition Variables and added a get() API on cond vars to get the current value.