Announcing Air.jl: STM and immutable collections

Yes, I think I know the intended use cases of STM. As I said, synchronization in transactions is arguably a bad idea. However, the usual pitch of STM is that it’s good for compositional API since nested transactions can be merged. This does not work well in general in Julia because using tasks or not is an implementation detail of a method and there’s no way to query this statically. But I don’t think it’s impossible. I sketched a design for ensuring method properties such as purity and yield-free: Suggestion: Fortran-like Keyword to Assert Function is Pure - #52 by tkf

For a bit of more context on my end, this is the reason why I’m interested in https://github.com/JuliaConcurrent/Reagents.jl which is kind of a fusion of STM and usual nonblocking programming. It can compose both nonblocking and synchronizing programs.

2 Likes