core.async Questions

2

Solved

Rich Hickey's Strange Loop transducers presentation tells us that there are two implementations of map in Clojure 1.6, one for sequences in clojure.core and one for channels in core.async. Now ...
Eskridge asked 30/10, 2014 at 12:23

3

Solved

When working with channels, is future recommended or is thread? Are there times when future makes more sense? Rich Hickey's blog post on core.async recommends using thread rather than future: W...
Copra asked 17/12, 2013 at 3:29

4

Solved

The number of possible executions of a function should be throttled. So after calling a function, any repeated call should be ignored within a time period. If there where calls in the meantime, the...
Swede asked 26/2, 2016 at 23:11

3

Solved

Let's say I have a corpus of computations that I want to run asynchronously using core.async, but unfortunately a few of the functions depend on the output of other functions. How do I go about str...
Randeerandel asked 11/11, 2015 at 21:18

3

Solved

I have a top-level core.async go loop. I want it to run indefinitely, at least until I signal it to stop with CTRL-C or kill or similar. I'm currently using java.lang.Runtime/addShutdownHook like t...
Exscind asked 10/12, 2013 at 2:56

4

Solved

When should I use Clojure's core.async library, what kind of applications need that kinda async thing? Clojure provides 4 basic mutable models like refs, agents, atoms and thread locals/vars. Can...
Retention asked 18/3, 2018 at 20:35

5

Solved

I have the following code in the file client.cljs : (ns onn.client (:require [enfocus.core :as ef] [enfocus.effects :as effects] [enfocus.events :as events] [clojure.browser.repl :as repl] [g...
Alexandrina asked 4/11, 2013 at 14:25

2

I have a stream of inputs and I want to make 2 HTTPS network requests for each before passing the result on to another part of the program. The typical throughput is 50 per second. for each input:...

3

Solved

I'm trying to write unit tests when using core.async go macros. Writing the test naively, as follows, it appears that the code inside the go blocks don't get executed. (ns app.core-test (:require ...
Instinctive asked 10/6, 2015 at 20:3

3

I have a process that is basically part of a long polling implementation. In a nutshell, the client makes a request to the server, which then creates a channel and returns it to that client. The ch...
Organic asked 23/7, 2014 at 14:17

2

Solved

I am trying to understand what's the correct way to handle errors using core.async/pipeline, my pipeline is the following: input --> xf-run-computation --> first-out first-out --> xf-run-...
Filings asked 28/12, 2016 at 17:20

2

Solved

I just noticed that the pipeline family returns a channel which seemingly operates completely independently of the purpose of the pipeline and it's related channels. Notice in the following exampl...
Megara asked 7/11, 2016 at 20:16

1

Solved

Why is the counter in the child component updating fine when I comment (om/update-state! owner :clicked not) and not when I uncomment it in the parent component in the code below? The counter ...
Indochina asked 18/9, 2014 at 16:9

3

Solved

I'm looking at Clojure core.async for the first time, and was going through this excellent presentation by Rich Hickey: http://www.infoq.com/presentations/clojure-core-async I had a question about...
Sarene asked 26/4, 2015 at 16:3

2

Solved

By default (go..) will use twice the number of cores + 42 threads for the thread pool. Is there any way I can set the number of threads, or number of CPUs that the code can use, through setting an ...
Tanguy asked 13/9, 2013 at 6:2

1

Solved

I wrote some core.async code in Clojure and when I ran it it consumed all available memory and failed with an error. It appears that using mapcat in a core.async pipeline breaks back pressure. (Whi...
Tinsley asked 21/6, 2016 at 19:51

3

Based on core.async walk through example, I created below similar code to handle some CPU intensive jobs using multiple channels with a timeout of 10 seconds. However after the main thread returns,...
Umberto asked 4/9, 2013 at 11:3

1

Solved

In order to try to understand core.async, I unsuccesfully tried to implement the "Skynet 1 million microbenchmark", which is: Creates an actor (goroutine, whatever), which spawns 10 new actors, ...
Assuan asked 15/2, 2016 at 3:20

1

Solved

I've read this great article about core.async here: http://www.core-async.info/reference/primitives I'm struggling to understand the internal mechanic of put! and go. I understand that: put! is...
Fisticuffs asked 11/2, 2016 at 14:16

1

Solved

I have read the following document and the example, but still doesn't get what it really means. I understand alts!!, but not alt!!.Anybody show an example easy to understand? https://clojure.githu...
Heribertoheringer asked 18/1, 2016 at 13:44

1

Solved

What are the techniques and libraries to do the integration testing in Clojure. Specifically interaction with databases, ring applications, core.async channels, anything which produces a side-effec...
Heptagon asked 18/11, 2015 at 9:14

1

Solved

I would like to batch messages on a core.async chan by count and timeout, (i.e. 10ms or 10 messages, whichever comes first). Tim Baldridge has a video on batching, but it uses deprecated functions ...
Oxidate asked 9/11, 2015 at 23:40

3

Solved

I've started using the clojure core.async library. I found the concepts of CSP, channels, go blocks really easy to use. However, I'm not sure if I'm using them right. I've got the following code - ...
Ratchet asked 19/10, 2015 at 0:35

3

Solved

I have a clojure processing app that is a pipeline of channels. Each processing step does its computations asynchronously (ie. makes a http request using http-kit or something), and puts it result ...
Haveman asked 10/10, 2015 at 7:55

2

Solved

With many go blocks going at once, all writing to the console, the text can get jumbled/intermingled when it arrives at the console. How to avoid this, so trace output forms as correctly in the con...
Carburetor asked 22/9, 2015 at 11:38

© 2022 - 2024 — McMap. All rights reserved.