class Cute::TimedBufferSink(T)

Overview

Combination of IntervalSink and BufferSink: Consumes data until either the maximum #size is reached, or the set #interval elapsed.

See Sink for documentation on the usage.

Defined in:

cute/timed_buffer_sink.cr

Constructors

Instance Method Summary

Instance methods inherited from class Cute::IntervalSink(T)

interval : Time::Span interval, interval=(interval : Time::Span) interval=, stop! stop!

Constructor methods inherited from class Cute::IntervalSink(T)

new(interval : Time::Span) new

Instance methods inherited from class Cute::Sink(T)

emit(data : Array(T)) : Nil emit, hit_count : Int32 hit_count, name : String name, new_channel : Tuple(Channel(Array(T)), Cute::ConnectionHandle) new_channel, notify(data : T) notify, on(&block : Proc(Array(T), Nil)) : Cute::ConnectionHandle
on(sink : Cute::Sink(U)) forall U
on
, stop! stop!

Constructor methods inherited from class Cute::Sink(T)

new new

Instance methods inherited from class Cute::Signal

disconnect(handler_hash)
disconnect
disconnect
, name : String | Nil name, wait wait

Constructor Detail

def self.new(size : Int32, interval : Time::Span) #

[View source]

Instance Method Detail

def size : Int32 #

Size of the buffer


[View source]
def size=(size : Int32) #

Size of the buffer


[View source]