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

Added support for Throotler #17

Closed
malcommac opened this issue Mar 17, 2018 · 1 comment
Closed

Added support for Throotler #17

malcommac opened this issue Mar 17, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@malcommac
Copy link
Owner

Throttling wraps a block of code with throttling logic, guaranteeing that an action will never be called more than once each specified interval. Only the last dispatched code-block will be executed when delay has passed.

Example:

let throttler = Throttler(time: .milliseconds(500), {
  // your code here
})

// Call throttler. Defined block will never be called more than once each specified interval.
throttler.call()
@malcommac malcommac added the enhancement New feature or request label Mar 17, 2018
@malcommac malcommac added this to the 0.5.0 milestone Mar 17, 2018
@malcommac malcommac self-assigned this Mar 17, 2018
@malcommac
Copy link
Owner Author

Published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant