View Source Electric.ConcurrentStream (electric v0.9.5)

Summary

Functions

Allows concurrent reading while writing of a stream. There can be mutiple reading processes however there must be only one writing process.

Functions

Allows concurrent reading while writing of a stream. There can be mutiple reading processes however there must be only one writing process.

The writing process must append an end marker to the end of the stream when it has finished to signal to the reading processes that the stream has ended.

If a read process runs out of data to read before the end marker has been written it waits the poll_time_in_ms for more data to be written, then resumes the stream with the stream_fun.