With Clojure (and other Lisp dialects), you can change the current code. So, when a function is changed at runtime, is that change made available to multiple threads?
I'm trying to understand how this works technically in parallel setup: if multiple threads use the foo function, what happens when I redefine (say, using defn) the foo function?
There must be some kind of synchronization: when and how does such synchronization take place and what does it cost?
Tell the JVM, is a function a volatile
reference? If so, does this mean that every time there is a โfunction searchโ, then you need to pay volatile
cost?
source share