Hello, I've been reading about nimrods threads/GC. It sounds like the GC can only be called from a single thread.
I have a C++ program running N threads and I want each of them to be able to call into Nimrod code, I assume this means they each need a separate GC, but I don't really see how to do this from reading the docs. It looks like a GC is associated with a Nimrod thread, is there some way to associate it with an existing thread created in C++?
Thanks
If you don't use the threadvar emulation (and you shouldn't if you can avoid it) Nimrod uses native thread variables, of which you get a fresh version whenever you create a thread. You can then attach a GC to this thread via
setStackBottom(addr(someLocal))
initGC()
That said, I don't know if setStackBottom and initGC are properly exposed to C. Patches are welcome.
However, it's much easier to create the threads with Nimrod and not with C++.