Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Its common for poll_ready and call to share state somehow. In the case of rate limiting poll_ready will typically acquire a permit from a semaphore which call consumes and releases when it is done. If the two functions weren't defined on the same type sharing state becomes harder. You basically have to use Arc>. I actually made a proposal for something like that in the past https://github.com/tower-rs/tower/pull/541 but we decided not use it because of practical limitations.
Its also heavily in linkerd-proxy https://github.com/linkerd/linkerd2-proxy which is a service mesh for kubernetes.