Class: Async::Limiter::Window::Sliding

Inherits:
Async::Limiter::Window show all
Defined in:
lib/async/limiter/window/sliding.rb

Constant Summary

Constants inherited from Async::Limiter::Window

NULL_TIME, TYPES

Instance Attribute Summary

Attributes inherited from Async::Limiter::Window

#count, #lock, #type

Instance Method Summary collapse

Methods inherited from Async::Limiter::Window

#acquire, #async, #blocking?, #limit, #limit=, #release, #sync, #window, #window=

Constructor Details

#initialize(limit = 1, window: 1, parent: nil, lock: true, queue: []) ⇒ Sliding

Returns a new instance of Sliding.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/async/limiter/window/sliding.rb', line 7

def initialize(limit = 1, window: 1, parent: nil, lock: true, queue: [])
  super(
    limit,
    type: :sliding,
    burstable: true,
    window: window,
    parent: parent,
    lock: lock,
    queue: queue
  )
end