Yuri Voinov

Results 16 comments of Yuri Voinov

https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock

https://stackoverflow.com/questions/17101922/do-i-have-to-acquire-lock-before-calling-condition-variable-notify-one/17102100

> > > @yvoinov In the case of `submit()`, if we don't lock the mutex then I believe that `notify_one()` could be called between checking whether the queue is empty...

Deadlock can occurs due to race/spurious wakeup.

It doesn't work that way. To protect against spurious wakeup, you should do something like this: https://github.com/yvoinov/thread-pool-cpp/blob/thread-pool-cpp-round-robin-stealing/include/thread_pool/worker.hpp. Mutexes do not play here. (If we're really have spurious wakeup case here.)

> > > https://stackoverflow.com/questions/17101922/do-i-have-to-acquire-lock-before-calling-condition-variable-notify-one This about different thing. Of course, you always can make your own tests to prove your own theory :)

I can cite a bunch of links proving that there is no need to block the notification of conditional variables. But I will not. :) You can continue to stay...

In addition: Mutexes is not slow. Slow only lock contention. So, think more, does you really want to slow down thread pool.

I see only this in cache.log: 'http://edigitalsurvey.com/l.php?id=INS-vt29-666188954&v=7215&x=3200&y=1800&d=24&c=null&ck=1&fl=11.2.202&p=%2F&xdm=edr&xdm_o=http%3A%2F%2Fwww.bbc.com&xdm_c=edr0' 2017/02/16 15:34:00.878 kid1| 11,2| http.cc(735) processReplyHeader: HTTP Server local=192.168.2.1:30539 remote=46.236.9.36:80 FD 31 flags=1 2017/02/16 15:34:00.879 kid1| 11,2| http.cc(736) processReplyHeader: HTTP Server REPLY: HTTP/1.1...

Ah. Better to do not process data with Transfer-Encoding header. It's require much more complicated processing logic. 16.02.2017 23:10, webcompressor пишет: > > Hi, > > Thank you Yuri. I'll...