class Tasker::Pipeline(Input, Output)

Overview

a lossy pipeline for realtime processing so any outputs are as up to date as possible. This means some results might be ignored at various stages in the pipeline.

Included Modules

Defined in:

tasker/pipeline.cr

Constructors

Instance Method Summary

Instance methods inherited from module Tasker::Processor(Input)

close : Nil close, closed? : Bool closed?, process(input : Input) : Bool process

Constructor Detail

def self.new(name : String | Nil = nil, &work : Input -> Output) #

[View source]

Instance Method Detail

def chain(name : String | Nil = @name, &work : Output -> _) #

push the output of this pipeline task into the input of the next task, if that task is idle


[View source]
def chain(task : Pipeline(Output)) #

push the output of this pipeline task into the input of the next task, if that task is idle


[View source]
def close : Nil #

shutdown processing


[View source]
def closed? : Bool #

check if the pipline is running


[View source]
def idle? : Bool #

is work being performed currently


[View source]
def name : String | Nil #

name of the pipeline


[View source]
def process(input : Input) : Bool #

non-blocking send


[View source]
def subscribe(&work : Output -> Nil) #

push all the outputs of this task to the subscriber


[View source]
def subscribe(subscription : Subscription(Output)) #

push all the outputs of this task to the subscriber


[View source]
def time : Time::Span #

the time it took to perform the last bit of work


[View source]