Does ANYONE know how to use memory regions beyond the examples that are available on the forum? These examples tend to consist of -
var rx: MemRegion
withRegion rx:
discard 0
While this example code proves regions work - it doesn't prove much beyond that. There is no - if any - mention of them in the docs.
The module itself claims - # Stacks can also be moved from one thread to another. - but there are not tests I can find involving regions or threads. https://github.com/nim-lang/Nim/blob/devel/lib/system/gc_regions.nim#L33
Does anyone besides Araq know how to use these regions successfully? If so - could some of that knowledge be disseminated so that I, or someone else, could work on documentation for this feature?
If no one knows how to use them properly - and we don't plan on documenting any time soon - is there any real reason to have them or include them?
I have a lot of difficulty finding any real use of them on github...
Well this feature is underdeveloped and so the code contains lies/stuff not implemented.
I see that the feature is not in the Nim manual any more. The manual always was aspirational, describing unimplemented features, but now I wonder, are regions no longer desired? Will destructors handle all cases where regions may have been used?