What would be an example scenario where an io! block would be used in Clojure? I am having troubles understanding its purpose.
It's a part of the STM system for ensuring that code related to IO is not used inside STM transactions. Since clojure will retry a transaction if another thread commits contradictory data while a transaction is running, any IO produced by that transaction would be bogus because it represents a state of memory that could be discarded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With