This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-22
Channels
- # announcements (4)
- # babashka (10)
- # beginners (25)
- # biff (4)
- # calva (22)
- # clj-on-windows (3)
- # clj-otel (1)
- # clojure (17)
- # clojure-europe (5)
- # clojure-gamedev (2)
- # clojure-norway (1)
- # clojurescript (21)
- # conjure (5)
- # core-async (3)
- # defnpodcast (1)
- # deps-new (8)
- # events (3)
- # graalvm (10)
- # graphql (4)
- # gratitude (2)
- # hyperfiddle (7)
- # introduce-yourself (4)
- # jobs (1)
- # membrane (9)
- # pedestal (5)
- # quil (2)
- # re-frame (7)
- # releases (2)
- # rewrite-clj (14)
- # shadow-cljs (8)
- # tools-deps (5)
Hey.
Is there a good way to put an infinite lazy sequence onto a channel? It will block until there is data.
Should I spawn a thread
and loop over it or should I use onto-chan!!
? Will onto-chan!!
do what I expect?
Edit:
Upon reading source of onto-chan!!
I think it's what I expect.
Does anybody know why does it lock up when I start multiple goroutines? I don't have a reproducible piece of code but I have a go block that I start twice in my code. And when I start it the first time it works. But later I make it exit that go block and then restart that same code which creates the go block. And then it blocks. Did I mess something up? Where should I look for issues?
Found it. It was because I locked up a lazy-sequence into repolling something which doesn't exist.