Given:

  * The goals defined in the first post of this topic
  * the answers received (thank you !)
  * Nim limitations " _Each thread has its own (garbage collected) heap and 
sharing of memory is restricted to global variables._ "
  * My struggling but unsuccessful attempts to have multiple threads accessing 
a common global data structure (
    
         growFunc0(ch:int64) {.gcsafe.} =  echo "started " & $nodeMap.len
    
    Run

leads to _growFunc0 ' is not GC-safe as it accesses 'nodeMap' which is a global 
using GC'ed memory_ with any compiler option)
  * The limited documentation of nim regarding this
  * The far-from-straightforward solutions suggested



... it seams that the reasonable action would be to switch back from nim to c++ 
(and possibly get back to nim when multi-threading evolves)

... unless someone has a working example of similar goals achieved with 
reasonably readable code.

Reply via email to