import std/options import std/sequtils import std/algorithm import std/locks import std/os import pkg/stew/byteutils import pkg/unittest2 import pkg/questionable import pkg/questionable/results include pkg/datastore/threads/sharedptr include pkg/datastore/threads/databuffer var shareVal: DataBuffer lock: Lock cond: Cond var threads: array[2,Thread[int]] proc thread1(val: int) {.thread.} = echo "thread1" {.cast(gcsafe).}: for i in 0..