haxiomic / haxe-c-bridge

Easily interact with haxe classes from C with an automatically generated C header
MIT License
51 stars 5 forks source link

Why does EventLoop reset the wake lock? #9

Closed haxiomic closed 3 years ago

haxiomic commented 3 years ago

So that event loop doesn't spin needlessly; every call to queue an event wakes the lock, but we only need one lock release to process all events. So the wait loop internal counter is cleared to 0 prior to processing the events

This causes a hang (which could be resolved by acquiring the mutex but that requires attaching to haxe thread)

haxiomic commented 3 years ago

Used a custom loop implementation