Function actor
Rocket.FunctionActor
— TypeFunctionActor{D} <: Actor{D}
FunctionActor provides a simple interface to use a single function as a next!
callback, error!
callback throws an ErrorException
and complete!
callback does nothing. Should not be used explicitly because it will be created automatically when passing a Function
object as an actor in subscribe!
function.
Examples
using Rocket
source = from(1:5)
subscribe!(source, (t) -> println(t))
;
# output
1
2
3
4
5
See also: Actor
, subscribe!