Has anyone run into this issue before? https://dev.clojure.org/jira/browse/ASYNC-110 I have a top-level go
block which seems to be causing the issue and I would like to keep it top level but I'm not sure how to address the problem
I understand this is cljs and different rules apply, but my prejudice coming from clj is to not allocate stateful resources in top level code, even something as trivial as wrapping it in a delay that gets forced via -main is an improvement over top level side effects
or a declare at the top level, and an assignment to the declared var via set! in -main
thanks! that makes sense to me. i'm writing this for an aws lambda function and if you execute code on load of the script you get performance benefits which is why I want it top-level.
sticking it in -main
would work, however the way the project is currently setup has only one -main
to speed up build times 🙂
oh, with multiple possible execution paths decided on startup, right, I can see the advantage of that
ya! it's working well so far. I could always switch to native javascript promises for this setup but hopefully there's a workaround!