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
We thought that this may be the case, but I was really confronted with the need when implementing the summing combinator (any) in #9. The only way we can "race" Governors is to try to acquire all of them and then race the promises. Unfortunately, once we acquire the first one, we can't cancel the other attempts. Instead, we just have to queue up a release once they resolve. This wouldn't be so bad if we were only considering simple counting Governors. But since we want Governors to also be able to implement time-based rate limiting, acquiring and immediately releasing a token is not equivalent to aborting an acquisition attempt (or just never attempting to acquire). So I don't see any way around depending on some kind of cancellation.
The text was updated successfully, but these errors were encountered:
We thought that this may be the case, but I was really confronted with the need when implementing the summing combinator (
any
) in #9. The only way we can "race" Governors is to try to acquire all of them and then race the promises. Unfortunately, once we acquire the first one, we can't cancel the other attempts. Instead, we just have to queue up arelease
once they resolve. This wouldn't be so bad if we were only considering simple counting Governors. But since we want Governors to also be able to implement time-based rate limiting, acquiring and immediately releasing a token is not equivalent to aborting an acquisition attempt (or just never attempting to acquire). So I don't see any way around depending on some kind of cancellation.The text was updated successfully, but these errors were encountered: