Fix race in 'BackgroundConsumer._thread_main'. (#8883)

See #7817.
diff --git a/google/api_core/bidi.py b/google/api_core/bidi.py
index 1fab26b..f73c7c9 100644
--- a/google/api_core/bidi.py
+++ b/google/api_core/bidi.py
@@ -642,7 +642,7 @@
                 # In the future, we could use `Condition.wait_for` if we drop
                 # Python 2.7.
                 with self._wake:
-                    if self._paused:
+                    while self._paused:
                         _LOGGER.debug("paused, waiting for waking.")
                         self._wake.wait()
                         _LOGGER.debug("woken.")