Wait until all channels are closed.

    Note:
        This does not time out, use gevent.Timeout.
169557
def wait_for_close(
        raiden: 'RaidenService',
        payment_network_id: PaymentNetworkID,
        token_address: TokenAddress,
        channel_ids: List[ChannelID],
        retry_timeout: float,
) -> None:
    
    return wait_for_channel_in_states(
        raiden=raiden,
        payment_network_id=payment_network_id,
        token_address=token_address,
        channel_ids=channel_ids,
        retry_timeout=retry_timeout,
        target_states=CHANNEL_AFTER_CLOSE_STATES,
    )
181272
def wait(self, timeout=None):
    

    if not self.__running:
      raise RuntimeError("ThreadPool ain't running")
    self.__queue.wait(timeout)
1054012
def wait_until_idle(self):
        

        done = threading.Event()

        def _callback():
            done.set()

        self.defer_until_idle(_callback)
        done.wait()
1243721
async def wait_closed(self):
        
        if self._server is None:
            raise RuntimeError('Server is not started')
        await self._server.wait_closed()
        if self._handlers:
            await asyncio.wait({h.wait_closed() for h in self._handlers},
                               loop=self._loop)
498125
def wait(self, allowed_methods=None):
        """"""
        method_sig, args, content = self.connection._wait_method(
            self.channel_id, allowed_methods)

        return self.dispatch_method(method_sig, args, content)
1219890
def waitForAllConnectionsToClose(self):
        
        if not self._connections:
            return self._stop()
        return self._allConnectionsClosed.deferred().addBoth(self._stop)
284134
private void closeChannel() {
        // TODO: race condition between this and the setChannel method.
        Channel c;
        synchronized (channelLock) {
            c = channel;
            channel = null;
            absoluteRemoteFs = null;
            isUnix = null;
        }
        if (c != null) {
            try {
                c.close();
            } catch (IOException e) {
                logger.log(Level.SEVERE, "Failed to terminate channel to " + getDisplayName(), e);
            }
            for (ComputerListener cl : ComputerListener.all())
                cl.onOffline(this, offlineCause);
        }
    }
732864
def wait_for_close(options={})
      seconds = options[:timeout] || 5
      timeout(seconds) do
        begin
          yield if block_given?
          sleep 0.05
        end until 0 == IsWindow(handle)
      end
    end
801930
def wait_to_end(self, pids=[]):
        '''
        

        '''
        actual_pids = self._get_pids(pids)
        return self.wait_for(pids=actual_pids, status_list=process_result_statuses)
379334
def wait_multi(self, channels, allowed_methods=None, timeout=None):
        """"""
        chanmap = dict((chan.channel_id, chan) for chan in channels)
        chanid, method_sig, args, content = self._wait_multiple(
                chanmap.keys(), allowed_methods, timeout=timeout)

        channel = chanmap[chanid]

        if content \
        and channel.auto_decode \
        and hasattr(content, 'content_encoding'):
            try:
                content.body = content.body.decode(content.content_encoding)
            except Exception:
                pass

        amqp_method = channel._METHOD_MAP.get(method_sig, None)

        if amqp_method is None:
            raise Exception('Unknown AMQP method (%d, %d)' % method_sig)

        if content is None:
            return amqp_method(channel, args)
        else:
            return amqp_method(channel, args, content)
560878
def wait(self, timeout):
        """"""
        self.condition.acquire()
        self.condition.wait(timeout // 1000)
        self.condition.release()
770185
def wait(self, timeout=15):
        

        Probe(timeout=timeout, fnc=self.is_ready, expected_retval=True).run()
737583
def wait(self, *, timeout=None):
        
        for _ in self.get_results(block=True, timeout=timeout):  # pragma: no cover
            pass
373351
async def wait_done(self) -> int:
        
        await self._done_running_evt.wait()
        if self._exit_code is None:
            raise SublemonLifetimeError(
                'Subprocess exited abnormally with `None` exit code')
        return self._exit_code
1277543
async def close(self, timeout=5) -> None:
        """"""
        if not self.is_running:
            _LOGGER.warning("FFmpeg isn't running!")
            return

        # Can't use communicate because we attach the output to a streamreader
        def _close():
            """Close ffmpeg."""
            self._proc.stdin.write(b"q")
            self._proc.wait(timeout=timeout)

        # send stop to ffmpeg
        try:
            await self._loop.run_in_executor(None, _close)
            _LOGGER.debug("Close FFmpeg process")

        except (subprocess.TimeoutExpired, ValueError):
            _LOGGER.warning("Timeout while waiting of FFmpeg")
            self.kill()

        finally:
            self._clear()
457390
def wait(self, dwMilliseconds = None):
        
        if self.value is None:
            raise ValueError("Handle is already closed!")
        if dwMilliseconds is None:
            dwMilliseconds = INFINITE
        r = WaitForSingleObject(self.value, dwMilliseconds)
        if r != WAIT_OBJECT_0:
            raise ctypes.WinError(r)
1043730
private static void wait(Object lock, int timeout)
  {
    try {
      lock.wait(timeout);
    }
    catch(InterruptedException unused) {
      Thread.currentThread().interrupt();
    }
  }