Say, I never did get an answer to either of the questions above. I'm still 
curious:

1\. If the json is stored in a thread-local heap, then I let other threads 
reference the json, those other threads are going to tend to touch the 
refcounts. But the refcounts, presumably, aren't atomic ints. How do I avoid 
accidentally trashing the refcounts?

2\. The compiler is trying very hard to prevent me from passing a ref to the 
json from the thread that created it to any other thread. (That's what gc-safe 
is all about). But as you mentioned before, I can force it with a cast. Is that 
part of the solution you're suggesting?

Reply via email to