Open graphitemaster opened 5 years ago
You're going to want to use WaitOnAddress
and WakeByAddress{All,Single}
on Windows, which isn't available until Windows 8, so you'll need to fallback. I suggest building a hash table of event objects and hashing the addresses to index the table. It'll result in spurious wake ups, but that's expected with futexes anyway.
Implement fibers on multiple threads, i.e M:N threading model. In addition, implement all the fiber sync primitives to match the kernel thread ones like mutex, condition variable, etc.