Fork me on GitHub
Alex Miller (Clojure team)13:07:16

You might want to look at pipeline-async


(@ska @alexmiller I have the same question)


@fhanreich: It's pretty hard to find docs and good examples in this area, isn't it?


@ska yes. I’m struggling with it. Any recommendations (resource, etc), I’d highly appreciate it.


pipeline-async returns a channel, which can be closed to stop it's running. This isn't mentioned in it's docstring, can the behaviour be depended upon?


Looking at the source code, this just stops the processor, and shouldn't be used.

Alex Miller (Clojure team)16:07:46

@ska that looks like a pretty good gist to me. I would recommend future instead of async/go in the af. Be aware that while you are making the external request, you are tying up a thread in the (fixed size) a/go pool and can thus cause everything to block. The future thread pool can grow however so does not suffer from this issue.

Alex Miller (Clojure team)16:07:29

@dominicm the docstring does not mention the result of pipeline-async, so I would not expect to use it for anything


@alexmiller Aside from the book Clojure Applied, which has been very helpful, are there any recommended resources to learn core.async (and Components) and put something (a small app) together for a beginner?

Alex Miller (Clojure team)20:07:05

Tim Baldridge has a bunch of videos that illuminate a lot of things