Class: Async::Limiter::Window::Fixed

Inherits:
Async::Limiter::Window show all
Defined in:
lib/async/limiter/window/fixed.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: []) ⇒ Fixed

Returns a new instance of Fixed.



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

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