> Read mratsim's post from the same thread then, 
> [https://forum.nim-lang.org/t/6352#39200](https://forum.nim-lang.org/t/6352#39200)

@mratsim shows no examples of what ARC can do, but I assume that ARC can help 
with the third scenario that he describes...

> You need a shared state, for example a shared hash table. Now you have a 
> problem :P, if it has infinite lifetime, you can allocate it on the heap and 
> pass a pointer to it, if not you need to implement atomic refcounting which 
> is not too difficult with destructors, see for example my refcounted events 
> in Weave

You will note that I wrote "The fact is that I have so far seen no evidence 
that --gc:arc makes mixing concurrency and parallelism in Nim easier". Yes, ARC 
does offer a shared heap and makes sharing memory easier, but the 
interoperability still isn't there between concurrency and parallelism. A 
shared heap does not solve this.

As a side note, I would like to see an example of that third scenario 
implemented using ARC, why hasn't @mratsim used it by default? :)

Reply via email to