Buffer actor
Rocket.buffer — Functionbuffer(::Type{T}, size::Int) where TArguments
::Type{T}: Type of data in buffersize::Int: size of buffer
Creation operator for the BufferActor actor.
Examples
using Rocket
actor = buffer(Int, 3)
actor isa BufferActor{Int}
# output
trueSee also: BufferActor, AbstractActor
Rocket.BufferActor — TypeBufferActor{D}() where DBuffer actor provides a storage actor. It copies last incoming successful next events in a values array, throws an ErrorException on error! event and does nothing on completion event. Note: Actor does not check the size of incoming data.
Examples
using Rocket
source = of([ 1, 2, 3 ])
actor = buffer(Int, 3)
subscribe!(source, actor)
show(getvalues(actor))
# output
[1, 2, 3]