Fix Notification listener blocking behavior

Add a sleep() to allow other threads (like the one collecting
the stats) to run.

Closes-Bug: #1555632
Change-Id: I6fcb63c10acd76f2815e23fbd303f08974feb993
This commit is contained in:
Davanum Srinivas 2016-03-11 12:15:49 -05:00
parent cc89fc3174
commit fb73297112

@ -14,6 +14,7 @@
# under the License.
import abc
import time
from oslo_config import cfg
from oslo_utils import timeutils
@ -51,6 +52,7 @@ def batch_poll_helper(func):
else:
# timeout reached or listener stopped
break
time.sleep(0)
return incomings
return wrapper