Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 579 Bytes

1.7.3.md

File metadata and controls

17 lines (13 loc) · 579 Bytes

1.7.3

  • Add rate-limiting to Callback and AsyncCallback:

    • def rateLimit(window: Duration, maxPerWindow: Int = 1): {CallbackTo,AsyncCallback}[Option[A]]
    • def rateLimitMs(windowMs: Long, maxPerWindow: Int = 1): {CallbackTo,AsyncCallback}[Option[A]]

    For example, if you wanted to limit a callback to a max of 5 times per second it would look like this:

    callback.rateLimit(1.second, 5)
  • Add implicit Reusability instances for:

    • SetIntervalHandle
    • SetTimeoutHandle
    • Callback.SetIntervalResult
    • Callback.SetTimeoutResult