You asked for an example, which I provided - apologies if that does not answer 
your question.

I think I provided a valid example though, which is about safety.

The only way to move data to another thread is by passing it through 
`unsafeIsolate()`. As a programmer I make a lot of stupid mistakes all the 
time, one of which might be assuming that my data is isolated, while in reality 
it is not. This will now result in an unsafe program that crashes or shows 
other kinds of unpredictable behavior.

I am not suggesting this should be solved by the type system, as I understand 
this is a hard problem: instead, in my initial post I suggested that atomic 
refs would be able to help with this.

As an alternative I can imagine a safe `runtimeIsolate()` that validates if a 
tree actually _is_ isolated, or throw an exception if it is not. I do not know 
how to implement this though.

Reply via email to