Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]add ratelimiter using async_simple coroutine #482

Merged
merged 15 commits into from
Nov 1, 2023

Conversation

StephenRi
Copy link
Contributor

Why

Give a rate limiter implemented by async_simple. So that user can use RateLimiter in coroutine project.

Example

coro_io::SmoothBurstyRateLimiter rateLimiter(10);
async_simple::coro::syncAwait(rateLimiter.acquire(1));

@StephenRi StephenRi force-pushed the feature/add-ratelimiter branch from befdf30 to 4f879b4 Compare October 31, 2023 08:14
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
include/ylt/coro_io/rate_limiter.hpp Outdated Show resolved Hide resolved
src/coro_io/tests/test_rate_limiter.cpp Outdated Show resolved Hide resolved
src/coro_io/tests/test_rate_limiter.cpp Outdated Show resolved Hide resolved
src/coro_io/tests/test_rate_limiter.cpp Outdated Show resolved Hide resolved
@qicosmos qicosmos self-requested a review November 1, 2023 03:12
Copy link
Collaborator

@qicosmos qicosmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qicosmos qicosmos merged commit 0e386d4 into alibaba:main Nov 1, 2023
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants