Re: How can I pass shared memory between threads?

2020-05-20 Thread mratsim
You can implement atomic refcounting with destructors. See what I do in my [multithreading runtime](https://github.com/mratsim/weave/blob/33a446ca4ac6294e664d26693702e3eb1d9af326/weave/cross_thread_com/flow_events.nim#L176-L201): type FlowEvent* = object e: EventPtr

How can I pass shared memory between threads?

2020-05-20 Thread Keithcat1
Hi, Does Nim have some good ways to handle shared memory? The only way I found was manual memory management, but that can't handle inner references and, hello, that's the reason I'm using a garbage collected language in the first place :D The experimental manual says that the parallel statement