threading
threading copied to clipboard
New atomics, thread primitives, atomic refcounting for --gc:arc/orc.
Adds RwLock, Barrier, Semaphore and Once, along with relevant tests and some examples. All doc comments are generated by AI so please review carefully. Note RwLock is not fair phase.
The compiler currently implicitly suggests I should box all my sends of POD types with objects so I can create null destructors (discard), which feels unnecessary. Isn't it isolated by...
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4. Release notes Sourced from actions/cache's releases. v4.0.0 What's Changed Update action to node20 by @takost in actions/cache#1284 feat: save-always flag by @to-s in actions/cache#1242...
While doing refactoring of channels (#21), I've separated all the raw ring/circular buffer logic into it's own object and put it in a module. I think this could prove useful:...
Is the ordering of the `GC_runOrc` and `wasMoved` correct? Intuitively I'd think that it'd be `wasMoved` then running `GC_runOrc` to handle cleaning up the ORC "roots" from the current thread?...
It seems that this module have fallen out of grace, with the respective RFC closed. Is it supposed to be deprecated in favor of std/atomics?
## The Problem - `import threading/channels` throws error when `--define:nimPreviewSlimSystem` ```sh /.nimble/pkgs2/threading-0.1.0-69d57091dff1983d92a3f39ed483bdb20d1b555c/threading/channels.nim(118, 3) Error: undeclared identifier: 'assert' candidates (edit distance, scope distance); see '--spellSuggest': ``` ### nim version ```sh 03:40...
Recently someone in the channel has tried to do Atomic[SharedPtr], but it's not currently possible. Of course you don't need the encapsulation, could also use an Atomic[bool] for this. But...
This code will leak because a refers to b and b refers to a and there's no possibility to fix this not using WeakPtr. ```nim import threading/smartptrs type Widget =...