You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be great if Semaphore supported _many variants for acquisition. To guarantee fairness, Event would need to change (as you'd need to check whether there are enough permits for the head of the listener list and only notify if that were the case). If interested, I have a set of changes for event-listener which I think does the trick (adding a new CondEvent type which allows data to be associated with listeners and a predicate over that data to be passed with notify). I also have another set of changes for async-lock which allow multiple permits to be acquired (I haven't fully tested them together, but will do so if this sounds like a good idea to you). Thanks!
The text was updated successfully, but these errors were encountered:
It'd be great if
Semaphore
supported_many
variants for acquisition. To guarantee fairness,Event
would need to change (as you'd need to check whether there are enough permits for the head of the listener list and only notify if that were the case). If interested, I have a set of changes forevent-listener
which I think does the trick (adding a newCondEvent
type which allows data to be associated with listeners and a predicate over that data to be passed with notify). I also have another set of changes forasync-lock
which allow multiple permits to be acquired (I haven't fully tested them together, but will do so if this sounds like a good idea to you). Thanks!The text was updated successfully, but these errors were encountered: