This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-16
Channels
- # announcements (8)
- # aws (28)
- # babashka (26)
- # beginners (125)
- # calva (18)
- # chlorine-clover (2)
- # cider (12)
- # cljs-dev (6)
- # cljsrn (4)
- # clojure (134)
- # clojure-europe (31)
- # clojure-italy (2)
- # clojure-nl (14)
- # clojure-uk (83)
- # clojurescript (81)
- # conjure (4)
- # cursive (2)
- # datomic (145)
- # emacs (13)
- # events (3)
- # figwheel-main (14)
- # fulcro (30)
- # graalvm (23)
- # graphql (15)
- # helix (21)
- # jackdaw (20)
- # juxt (1)
- # lambdaisland (4)
- # leiningen (2)
- # malli (12)
- # meander (22)
- # observability (22)
- # off-topic (27)
- # pedestal (3)
- # re-frame (12)
- # reitit (1)
- # releases (2)
- # rewrite-clj (3)
- # shadow-cljs (67)
- # spacemacs (7)
- # sql (1)
- # tools-deps (19)
- # unrepl (2)
- # xtdb (25)
hey, just wondering if any of you have come across this before - dispatches aren't processed in safari when the browser window isn't active.
the queues are processed when the tab is made active / browser window becomes visible etc
Oh, you might be hitting a requestanimationframe thing? Reframe uses that for working out when to re-run computations. I believe browsers pause that when the window is inactive. Docs reference: https://github.com/day8/re-frame/blob/master/docs/flow-mechanics.md#truth-interlude
re-frame runs dispatch events on goog.async.nextTick https://github.com/day8/re-frame/blob/master/src/re_frame/router.cljc#L187 which seems not executed in background https://github.com/google/closure-library/blob/d55cca5b83d573f8db10f6cceae243b246db1f23/closure/goog/async/nexttick.js#L54
@U051091NM setImmediate calls aren't processed in the background, when tabs are inactive?
oh, there's terrible browser support for it! looks like nextTick
will almost always use the polyfill
so i guess what's happening is that the dispatch queue is being processed, but the reactions aren't.
@U3ZUC5M0R you’re right. background timers are processed in background (no more than 1 per sec though in Chrome) https://developers.google.com/web/updates/2017/03/background_tabs#background_timer_alignment but rAF is not