
@yvan.godin has joined the channel

Ha yes boxes confused me, too. My current understanding: I rarely use boxes. Often parameters — not function args, I mean make-parameter
parameters — are a nice way to hold mutable state. Now, parameter values are per-thread. Often that is nice and exactly what you want. When all threads should share one value, sometimes a nice way to express that is to use a box and update it atomically with box-cas!
https://docs.racket-lang.org/reference/boxes.html#%28def._%28%28quote._~23~25kernel%29._box-cas%21%29%29

You can also build on top of that to do things like Clojure’s swap! for refs, e.g. a box-swap!
https://docs.racket-lang.org/rackjure/index.html#%28def._%28%28lib._rackjure%2Futils..rkt%29._box-swap%21%29%29

@cosmez ^

So that’s my current understanding, which is maybe still not quite complete or correct, but… ¯_(ツ)_/¯

parameter value per-thread. that means if i create a parameter outside the trade scope, it will create a copy for that thread ?

Yes parameters are built on top of thread cells. A new thread initially inherits a copy of the value. Thereafter the value is independent.

