Use multithreading without channel and threadpool

2022-12-24 Thread c4UlMu
Thank you

Use multithreading without channel and threadpool

2022-12-22 Thread ElegantBeef
Yes the code will be threadsafe, though there is a caveat. If you create a variable that points to a reference type you will likely want to do `let myVar {.cursor.} = myRef` this creates a 'weak' reference to the reference that does not cause any GC on this thread. As this thread likely does not

Use multithreading without channel and threadpool

2022-12-22 Thread c4UlMu
I noticed that I cant't use ref variable in thread even with orc (it said that with orc we have shared memory) For example var workers: array[10, Thread[void]] var name = "Hey" proc printer() {.gcsafe.} = echo name for i in 0..high(workers):