Would you be interested in an implementation of Conditionals in Sync.zig? I'm working on a toy project with zig-aio and could really use a Conditional in the style of pthreads. Functionally, it'd be pretty similar to the ResetEvent, but signaling the Condition only awakens a single waiter from a wait queue.
From looking around the codebase, I'd have to add a WaitQueue type to Frame (doubly linked list) and a corresponding link attribute to the Frame. Otherwise, it would just be a new struct in Sync.zig.
I've actually hacked something together, so I'll throw up a PR you can take a look at. I noticed there are no tests for Sync, I'll add some of those too if it's easy enough.
Would you be interested in an implementation of Conditionals in Sync.zig? I'm working on a toy project with zig-aio and could really use a Conditional in the style of pthreads. Functionally, it'd be pretty similar to the ResetEvent, but signaling the Condition only awakens a single waiter from a wait queue.
From looking around the codebase, I'd have to add a WaitQueue type to Frame (doubly linked list) and a corresponding link attribute to the Frame. Otherwise, it would just be a new struct in Sync.zig.