StashTable
Concurrent hash table
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:24 |
Tags
Installation
nimble install StashTable
choosenim install StashTable
git clone https://github.com/olliNiinivaara/StashTable
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| StashTable | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/olliNiinivaara/StashTable |
|---|---|
| Homepage | https://github.com/olliNiinivaara/StashTable |
| Registry Source | nimble_official |
README
StashTable
Concurrent hash table for Nim. Excellent way to safely share arbitrary data between multiple threads.
Example
# nim r example.nim
import os, random, stashtable
type SharedData = StashTable[string, seq[string], 100]
proc threading(d: tuple[t: int, shareddata: SharedData]) =
for i in 0 .. 10:
sleep(rand(10))
d.shareddata.withValue("somekey"): value[].add($d.t & "->" & $i)
let shareddata = newStashTable[string, seq[string], 100]()
shareddata.insert("somekey", @[])
var threads: array[2, Thread[tuple[t: int, shareddata: SharedData]]]
for i in 0 .. 1: createThread(threads[i], threading, (i, shareddata))
joinThreads(threads)
echo shareddata
Installation
latest stable release (1.2.2):
atlas use StashTable
Documentation
https://olliNiinivaara.github.io/StashTable/
Tests and benchmarking
https://github.com/olliNiinivaara/StashTable/blob/master/tests/testing.md