We thought that this may be the case, but I was really confronted with the need when implementing the summing combinator (any) in https://github.com/tc39/proposal-concurrency-control/pull/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.
We thought that this may be the case, but I was really confronted with the need when implementing the summing combinator (
any
) in https://github.com/tc39/proposal-concurrency-control/pull/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.