Open
Description
Currently Rex uses OS primitives to implement Mutex and ConditionVariable, each being 64 bytes in size! This overhead is not appreciable. Rex also implements a WordLock which is a thinner Mutex type taking just a word of storage made possible by managing it's own per-thread data structures and thread parking as borrowed from WebKit. We should reimplement the full user-space parking-lot API to get single byte Mutex and ConditionVariables, this way we may introduce a word-size Promise (which require both a mutex and condvar) implementation for asynchronous background work.