try with combination of channel, lock and condition ?

like this 
[example](https://forum.nim-lang.org/\(https:/github.com/mashingan/nim-etc/blob/master/cond_loop.nim)

Reply via email to