Processor<R, I> class

setup an isolate process to run a given function with 2-way communication

Notes

  • Startup time (worst-case): 200ms
  • Force-kill time (worst-case): 10ms

Constructors

Processor.setupAsync(Future<R> function(I input))
setup a Processor that will run the provided (asynchronous) function
Processor.setupSync(R function(I input))
setup a Processor that will run the provided (synchronous) function

Properties

function ↔ dynamic Function(I input)
the function being run in the isolate
latefinal
hashCode int
The hash code for this object.
no setterinherited
isAsync bool
weather the function being run internally is asynchronous
latefinal
outputStream Stream<R>
a Stream containing processed outputs
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

kill({bool awaitCompletion = true}) Future<void>
shutdown the Processor after currently supplied inputs are processed
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(I input) → void
send an input to be processed
start() Future<void>
startup the Processor (creates the underlying isolate)
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited