This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-25
Channels
- # aleph (15)
- # beginners (65)
- # boot (46)
- # chestnut (3)
- # cider (1)
- # clara (11)
- # cljs-dev (5)
- # cljsjs (4)
- # cljsrn (13)
- # clojure (180)
- # clojure-dev (2)
- # clojure-italy (10)
- # clojure-russia (62)
- # clojure-spec (6)
- # clojure-uk (85)
- # clojurescript (45)
- # community-development (11)
- # crypto (3)
- # cursive (10)
- # datomic (94)
- # defnpodcast (2)
- # fulcro (4)
- # heroku (1)
- # hoplon (4)
- # jobs (3)
- # juxt (10)
- # leiningen (1)
- # luminus (4)
- # mount (13)
- # music (1)
- # off-topic (10)
- # onyx (2)
- # portkey (15)
- # proton (2)
- # re-frame (16)
- # reagent (10)
- # shadow-cljs (194)
- # spacemacs (2)
- # specter (2)
Hi all. I'm running into some trouble involving core.async and mount, where I (mount/start)
and everything seems fine, but then inside of a (go-loop)
the component shows up as a mount.core.NotStartedState
Do I need to (mount/start)
inside every go block? Seems like I'm hitting a threading problem, but I'm not sure how to resolve it
> inside of a (go-loop)
the component shows up as a mount.core.NotStartedState
which component, you mean a channel?
Nope, it's just a plain map
So like I have (defcomponent config :start (load-config-from-edn))
My test fixtures do a (mount/start #'config-ns/config)
and then run some code which kicks off a (go-loop)
Inside of the go-loop, when I print the value of config
I see a NotStartedState
But outside of it I see the actual value
I'm also often running under lein test-refresh
so it's possible I've hosed up start/stop logic somewhere without realizing it
I'm also thinking it might be a timing thing, like the go-loop kicks off and executes before the EDN file has finished processing
Hmm, and actually now that I've played with it some the problem disappeared 😐
I don't think (go-loop)
would introduce uncertainty into component's state. it could very well be lein test-refresh
stopping it without you realizing it. can you hook up logging (yourself or with https://github.com/tolitius/mount-up) and see when the state(s) are stopped/started?