(chan? c)
Check if c is a core.async channel.
Check if c is a core.async channel.
(chunked-send! x buffer-size chunk-size f)
Helper to make the process of sending chunks of steps to some external source. The buffer-size will decide how many chunks to progress while chunk-size will define the number of steps to send at each chunk. f is fn that receives chunk-size number of ops once they are ready. f may return a core-async channel. In case it does, the sender will wait for that channel to return a message before consuming the next chunk.
Helper to make the process of sending chunks of steps to some external source. The buffer-size will decide how many chunks to progress while chunk-size will define the number of steps to send at each chunk. f is fn that receives chunk-size number of ops once they are ready. f may return a core-async channel. In case it does, the sender will wait for that channel to return a message before consuming the next chunk.
(decode-async in-chan)
Takes a channel that spits chunks of ops, returns a promise channel that will output the restored value once all the chunks are consumed.
Takes a channel that spits chunks of ops, returns a promise channel that will output the restored value once all the chunks are consumed.
(decode-step state op)
Consumes a single decode operation step. Moves the state to the next iteration applying the op.
Consumes a single decode operation step. Moves the state to the next iteration applying the op.
(decode-sync ops)
Decode ops is a helper to get one sequence with all the ops to rebuild a structure, and process it.
Decode ops is a helper to get one sequence with all the ops to rebuild a structure, and process it.
(encode x)
(encode out x)
(encode-async! out-chan x)
Start sending ops to that channel encoding x. Returns the channel, note when the channel is full, the encoding process will park until slots are released. Also note you must not use a channel with a sliding/dropping buffer, dropping any ops will cause a corrupted data structure in the other end.
Start sending ops to that channel encoding x. Returns the channel, note when the channel is full, the encoding process will park until slots are released. Also note you must not use a channel with a sliding/dropping buffer, dropping any ops will cause a corrupted data structure in the other end.
(encode-async* out-chan x)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close