> Is that the plan?

Almost. We need to run the cycle collector before a send already to ensure the 
thread local "cycle candidates" list is empty (note that it is always empty 
after a cycle collection), otherwise it would interfere with multi-threading. 
Alternatively we can make the list global and protected via a lock (or 
implement it as lockfree queue...).

There are many other options, we can also restrict the sending to `.acyclic` 
types.

Or we request that "orphaned objects" that will be misdetected as false 
external roots to be cleaned up manually. That is a good idea anyhow, ensuring 
the programmer he still aware of the typology:
    
    
    proc process(x: Node) =
      use(x.left)
      # likely invalid:
      spawn process(x.right)
      # better: extract it
      spawn process(move x.right)
    
    
    
    Run

Reply via email to