This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-24
Channels
- # announcements (3)
- # babashka (23)
- # beginners (35)
- # cider (3)
- # clara (3)
- # clj-kondo (14)
- # cljdoc (1)
- # cljs-dev (1)
- # clojure (82)
- # clojure-austin (9)
- # clojure-europe (5)
- # clojurescript (23)
- # conjure (62)
- # cursive (73)
- # defnpodcast (1)
- # emacs (3)
- # ethereum (1)
- # gratitude (1)
- # hyperfiddle (12)
- # introduce-yourself (1)
- # leiningen (2)
- # lsp (44)
- # malli (7)
- # polylith (2)
- # portal (17)
- # re-frame (5)
- # reitit (3)
- # sci (8)
- # shadow-cljs (5)
- # tools-build (11)
Bit myself with event competition.
I’m setting db route via :set-route
during the initialisation phase, then from a different place comes another :set-route
. And they start to compete one sets route then updates url, and that url update in turn triggers another :set-route
to make sure that data is in there.
While I acknowledge that it’s a bad design, and I’m fixing it – are there any other measures, to ensure that only one :set-route
can be accepted into re-frame event queue?
Such event-based infinite loops are a relatively common thing in similar systems. I don't think there's anything in re-frame to prevent it, but in general people set some flag somewhere to signify that the activity has been triggered by :set-route
where that flag tells that activity not to issue new :set-route
.
@U2FRKM4TW Thanks! Yeah, thinking about some locking or queueing mechanism too