xarray-contrib / xarray-simlab

Xarray extension and framework for computer model simulations
http://xarray-simlab.readthedocs.io
BSD 3-Clause "New" or "Revised" License
73 stars 9 forks source link

`any_object` possible concurrency problems -> strict checking? #190

Open feefladder opened 3 years ago

feefladder commented 3 years ago

Since the any_object class does not specify intent and is passed (AFAIK) as-is to other processes, there could be concurrency problems when multiple processes try to mutate it.

possible solutions

This could be solved manually by the user once custom dependencies are in effect. However, it may be nice to also add intent and strict checking for the any_object class

benbovy commented 2 years ago

Hi @Joeperdefloep, sorry for the wait, I've been silent in this repository for too long.

any_object actually implicitly defines VarIntent.OUT, so I think in theory it shouldn't be possible to have a model with another process making reference to it and changing its value.