AsyncAnimationSink

constructor(capacity: Int = DEFAULT_CAPACITY, overflowPolicy: AsyncAnimationSink.OverflowPolicy = OverflowPolicy.BLOCK, consume: (AnimationEvent) -> Unit)(source)

Parameters

capacity

the bounded queue size (number of events); must be >= 1

overflowPolicy

what emit does when the queue is full

consume

the write action invoked on the writer thread for each event, in emission order (e.g. { event -> output.write(event) })