3 ms·
I don't know if you mean something deeper, but core.async has <!, >!, and alts! variants that don't require a go block: <!!, >!!, and alts!!. You can just use
by bcrosby95 4y ago
I don't know if you mean something deeper, but core.async has <!, >!, and alts! variants that don't require a go block: <!!, >!!, and alts!!.
You can just use them like a function. But they block the thread. So if you e.g. naively call it in the REPL you will block it indefinitely. E.g.:
(>!! (chan) "this will block the REPL")
The idea would be to pass a channel to multiple virtual threads which use the blocking versions.