@rayman22201  your solution is much more elegant than mine and works also 
perfectly ; many thanks for that. yes the wait has to release the lock - 
anything else makes no sense (unfortunately send_all is missing in the 
locks-module). Decades ago I did hardware-design, so the latch is my mental 
model 

At the moment I am about to implement a softtimer-pool solution in Nim with a 
locking (wait) and a nonblocking (polling) api. I am not sure if I can afford 
acquiring a lock in my worker-thread because I like a one-thread solution and 
the "wait_for" stuff is missing in Nim (at the moment I am still at the 
beginner-street there  so it could be possible I have to go with my clumsy 
solution. When finished I will push it on github. But anyway many thanks for 
your great support 

Reply via email to