core.async Questions

3

Is there an elegant way to stop a running go block? (without introducing a flag and polluting the code with checks/branches) (ns example (:require-macros [cljs.core.async.macros :refer [go]]) (...
Gallia asked 14/9, 2015 at 17:58

2

Solved

In the same way alt! waits for one of n channels to get a value, I'm looking for the idiomatic way to wait for all n channels to get a value. I need this because I "spawn" n go blocks to work on a...
Rexrexana asked 6/8, 2015 at 14:45

1

Solved

I want to create a channel of clojure.core.async from another one that just filters specific messages. Therefore I found a function called filter<. => (def c1 (chan)) => (def c2 (filter&l...
Executor asked 8/7, 2015 at 7:29

2

From http://martintrojer.github.io/clojure/2013/07/07/coreasync-and-blocking-io/ : To get a bit more concrete let's see what happens when we try to issue some HTTP GET request using core.async...
Ruthi asked 20/5, 2015 at 17:29

1

Solved

In Clojure core.async, are channels and ports the same thing? If not what's the difference? In watching the video Timothy Baldridge - Core.Async, he creates a channel (def c (chan)) Then later ...
Thiol asked 2/5, 2015 at 0:12

5

I seem to be a little bit confused when comparing Clojure's core.async to the so called Reactive Extensions (Rx) and FRP in general. They seem to tackle similar problem of async-hronicity, so I won...
Rashid asked 17/12, 2013 at 11:7

1

Solved

Close method (at least in java world) is something that you as a good citizen have to call when you are done using related resource. Somehow I automatically started to apply the same for the close!...
Weissmann asked 5/3, 2015 at 21:43

1

Solved

This is the current version of the code that does very simple job. It starts up 10 go routines and each routine adds 10 messages to the channel. The other end is a while true loop that reads the ch...
Nevins asked 13/11, 2014 at 19:2

2

Solved

Is core.async a replacement to Lamina or does it intend to become a replacement for Lamina? If not, are there clear situations where one is preferable over the other?
Transport asked 7/11, 2014 at 12:12

1

Solved

The threadpool implementation in core.async clojure library uses a FixedThreadPoolExecutor of size = # of cores * 2 + 42. (defonce the-executor (Executors/newFixedThreadPool (-> (Runtime/get...
Gervase asked 17/10, 2014 at 18:26

1

Solved

I'm new to clojure core.async library, and I'm trying to understand it through experiment. But when I tried: (let [i (async/chan)] (async/go (doall (for [r [1 2 3]] (async/>! i r))))) it giv...
Safire asked 25/9, 2014 at 14:17

1

Solved

I'm wondering if it's possible to put together a fully non-blocking Clojure backend web application with http-kit. (Actually any Ring-compatible http server would be fine by me; I'm mentioning htt...
Sampson asked 27/7, 2014 at 10:27

1

Solved

I have had a look at using Om for rich client website design. This also is my first time using core.async. Reading the tutorial https://github.com/swannodette/om/wiki/Basic-Tutorial I have seen the...
Degraded asked 28/5, 2014 at 6:45

4

I'm using Clojure with core.async, and have a situation where I want to put a rate limit on the number of messages processed through a channel. In particular I would like to: Define a rate limit...
Photoneutron asked 20/2, 2014 at 7:30

1

Solved

I've been using core.async for some time, but avoided pub and mult, since I can't really grasp a useful usecase from their documentation. Specifically what's the purpose of the topic-fn and how wo...
Zoography asked 20/3, 2014 at 10:50

1

Solved

I can't figure out the difference between: alts! and alt! in Clojure's core.async.
Lcm asked 28/2, 2014 at 3:17

1

Everybody is talking about how great core.async is, and how it will improve event handling in clojurescript. I've been following the ClojureScript 101 tutorial, and I don't see any clear advantage ...
Tetchy asked 18/2, 2014 at 6:31

3

I'm writing an application server in Clojure that will use ClojureScript on the client. I'd like to find an efficient, idiomatic way to push data from the server to the client as realtime events, ...

1

Solved

all to often when I'm using core.async from the repl a go block will get away from me because I loose the channel that is used to stop it because I reload a namespace. For instance if i run this fr...
Loveinidleness asked 13/2, 2014 at 2:33

1

Solved

Is it recommended to extend the functionality of core.async with my own asynchronous functions? The asynchrony of channels is handled by put! and take! which accept callbacks, but the protocols ar...
Melisma asked 31/10, 2013 at 6:8

6

Solved

I have seen many Clojure programmers enthusiastic about the new core.async library and, though it seems very interesting, I am having a hard time seeing how it conforms to Clojure principles, so I ...
Opine asked 13/8, 2013 at 0:9

2

Solved

As we know - core.async uses CSP and is similar to goroutines from go-lang. Now for a scenario like select and alt this makes a lot of sense. David Nolen has done an amazing demo here showing cor...
Windshield asked 9/1, 2014 at 23:5

2

Solved

Consider the following snippet: (let [chs (repeatedly 10 chan)] (doseq [c chs] (>!! c "hello")) (doseq [c chs] (println (<!! c)))) Executing this will hang forever. Why is that? If I ...
Paisano asked 4/1, 2014 at 22:34

2

Solved

In Clojure's core.async library we see a macro that creates a state machine that wraps around go blocks to create channels that handle blocking IO. This appears to be modelling on C#'s async and ...
Legume asked 30/12, 2013 at 21:35

1

Solved

I am new to clojure and am writing a library that sends post results to a server for a response. I consume the response by placing it onto a core.async channel. Is this sane or is there a better wa...
Oakes asked 12/12, 2013 at 4:4

© 2022 - 2024 — McMap. All rights reserved.