Well in your example you can just remove the `ref` and use a non-threadvar.
But in general, there is currently no better solution. We had some attempts but they all encouraged racy code. The "new runtime" will significantly improve the situation here as then standard seqs and strings can be put into the shared heap.
