Skip to content

clojure.core.async/take!

View this page on ClojureDocs

Type: function Added: Clojure unknown Examples: 2 Runnable: 0
([port fn1] [port fn1 on-caller?])

Asynchronously takes a val from port, passing to fn1. Will pass nil if closed. If on-caller? (default true) is true, and value is immediately available, will call fn1 on calling thread.

fn1 may be run in a fixed-size dispatch thread pool and should not perform blocking IO, including core.async blocking ops (those that end in !!).

Returns nil.

Examples

by runexec on . May have evaluation errors.
by jayzawrotny on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.