zeroc-ice / ice-demos

Sample programs for Ice
https://zeroc.com
GNU General Public License v2.0
325 stars 215 forks source link

Ice/async occasional shutdown delay #59

Closed bernardnormier closed 5 years ago

bernardnormier commented 5 years ago

The Ice/async WorkQueue needs to be check the _done flag when it wakes up from wait/timedWait, and there is a spot where it doesn't. For example in C++11: https://github.com/zeroc-ice/ice-demos/blob/3.7/cpp11/Ice/async/WorkQueue.cpp#L45

So in the event we get a new work item and the shutdown at about the same time, we'll miss the shutdown (_done) and wait for the full delay (5s) before checking _done and returning an exception.

This bug affects all language mappings with an Ice/async demo.