Hi.
I've come to the conclusion that what I need to build my shared-heap thread-safe concurrent data-structures, rather than thread-safe shared lists and shared tables, is unguarded (thread-unsafe, if you will) shared lists and tables (and probably shared sets too), so that I can manage the lock myself, and not end up having to have a lock implementing a "user transaction" around a combination data-structures that already have their own locks.
The implementation of "table" is "in plain sight", so that I can probably clone it, changing just enough so that it works on the shared heap. But table builds on seq, so I need a "shared seq" first. I have something like a shared seq already, but idk how “complete” it is. That is the point at which I realized that I can neither find the seq source code, which looks like this:
seq*{.magic: "Seq".}[T]
Nor some wiki page that would document what is the actual API of a seq. I'm hoping I just "missed" it, and it is actually documented somewhere... (considering it's the core data-structure).
OTOH, if someone can point me to an existing shared-heap, unguarded/unsynchronized implementation of seq and tables, that would save me even more time. A cursory glance at nimble packages didn't reveal anything like that.
You can go to https://nim-lang.org/docs/system.html and select "Group by type". After lots of scrolling a section seq shows up that lists what is available for seq.
Btw, interesting design choice wrt to the locking, I had similar ideas. Note that you cannot leave out the lock around the memory manager as it operates on a different level.