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

Add Throttle and LogThrottle classes to manage throttled APIs. #2265

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

nat-goodspeed
Copy link
Collaborator

No description provided.

@nat-goodspeed
Copy link
Collaborator Author

Seeing the pattern of functions being throttled, I've been thinking about such a wrapper for a while now. The usage is a little more awkward than I'd hoped. Is it worth pursuing this direction?

I'd like even better to have LogThrottle (or some other subclass) wrap a whole LLEventAPI subclass method, so we could directly pass the LogThrottle data member to LLEventAPI::add(). I haven't yet tried to make that work.

Another Throttle subclass I'd like to see would be one that knows about the void(const LLSD&) signature and uses sendReply() to notify the LEAP invoker that the call has been throttled.

Copy link
Contributor

@maxim-productengine maxim-productengine left a comment

Choose a reason for hiding this comment

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

I like this wrapper. I'm sure it will be handy with future apis too.

@maxim-productengine maxim-productengine merged commit e363ae5 into lua-groupchat Aug 13, 2024
12 checks passed
@maxim-productengine maxim-productengine deleted the lua-groupchat-throttle branch August 13, 2024 11:01
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants