Hi elcritch,

It's quite easy to trick even ORC by using `GC_ref` in sender thread and 
`GC_unref` in receiver thread. Not sure how safe it is tho !

I've created a Container object to allow this: 
<https://github.com/Alogani/NimGo_multithreadingattempt/blob/main/src/nimgo/private/safecontainer.nim>,
 which must be used inside the awesome SharedPtr 
(<https://github.com/nim-lang/threading/blob/master/threading/smartptrs.nim>), 
without forgetting to use a channel to avoid race condition ;-)

But the standard way is to use std/isolation. This channel implementation uses 
it : <https://github.com/nim-lang/threading/blob/master/threading/channels.nim>

Reply via email to