Hi everyone, recently I have been experimenting with building a Go-style CSP based concurrency runtime in C. It is now evolved into a small M:N scheduled runtime with :
A worker thread pool (M:N scheduler)
Go-style channels (buffered & unbuffered)
select over multiple channels
Timers and ticker
Context-style cancellation
WaitGroup and Mutex primitives
Optional signal-based preemption
Since I am primarily designing it to be able to use goroutines like something in nim.
A question will be: why in C it has reason like I wanted that to be useful in other languages as well.
I recently got a larger “grand example” working that combines worker pools, select with timeout, cancellation, and synchronization across multiple cores. But note that It is still being stress-tested and hardened, but functionally it behaves similarly to goroutine-style concurrency.
Since this will take time(some weeks to months) for more testing and but I want to know opinion on of the Nim community on this and is something like this useful (besides my personal use) ?
I know that Nim has async/await (event-loop based) and OS threads with --threads:on and also lib like NimGo(through not actively maintained) and nor did I am claiming that this is better than them, I am just trying to make for my own use now if it perform well I will definitely plan.
So I am here to ask is there interest in Go-style CSP concurrency in Nim ? Also any advice is useful, (Please avoid offtopic and history related things).
Will try to port that if it perform as expected currently there is one minor problem in my code mostly related to select integration with timer but it can be resolved easily soon.
But more importantly that a part of my code even uses assembly inside c so I will need time to find some solution to that.