Did I find the right examples for you? yes no

All Samples(13)  |  Call(6)  |  Derive(0)  |  Import(7)
Collect all values encapsulated in the list of futures.

If ``timeout`` is not :class:`None`, the method will wait for a reply for
``timeout`` seconds, and then raise :exc:`pykka.Timeout`.

:param futures: futures for the results to collect
:type futures: list of :class:`pykka.Future`

:param timeout: seconds to wait before timeout
:type timeout: float or :class:`None`(more...)

        def get_all(futures, timeout=None):
    """
    Collect all values encapsulated in the list of futures.

    If ``timeout`` is not :class:`None`, the method will wait for a reply for
    ``timeout`` seconds, and then raise :exc:`pykka.Timeout`.

    :param futures: futures for the results to collect
    :type futures: list of :class:`pykka.Future`

    :param timeout: seconds to wait before timeout
    :type timeout: float or :class:`None`

    :raise: :exc:`pykka.Timeout` if timeout is reached
    :returns: list of results
    """
    return [future.get(timeout=timeout) for future in futures]
        


src/p/y/Pykka-1.2.0/pykka/__init__.py   Pykka(Download)
# flake8: noqa
from pykka.actor import Actor, ActorRef, ThreadingActor
from pykka.exceptions import ActorDeadError, Timeout
from pykka.future import Future, get_all, ThreadingFuture
from pykka.proxy import ActorProxy

src/p/y/pykka-HEAD/pykka/__init__.py   pykka(Download)
# flake8: noqa
from pykka.actor import Actor, ActorRef, ThreadingActor
from pykka.exceptions import ActorDeadError, Timeout
from pykka.future import Future, get_all, ThreadingFuture
from pykka.proxy import ActorProxy

src/x/b/xbmc-addon-watchdog-HEAD/lib/pykka/__init__.py   xbmc-addon-watchdog(Download)
# flake8: noqa
from pykka.actor import Actor, ActorRef, ThreadingActor
from pykka.exceptions import ActorDeadError, Timeout
from pykka.future import Future, get_all, ThreadingFuture
from pykka.proxy import ActorProxy

src/p/y/Pykka-1.2.0/tests/future_test.py   Pykka(Download)
 
from pykka import Timeout
from pykka.future import Future, ThreadingFuture, get_all
 
 
    def test_get_all_blocks_until_all_futures_are_available(self):
        self.results[0].set(0)
        self.results[1].set(1)
        self.results[2].set(2)
        result = get_all(self.results)
    def test_get_all_can_be_called_multiple_times(self):
        self.results[0].set(0)
        self.results[1].set(1)
        self.results[2].set(2)
        result1 = get_all(self.results)
        result2 = get_all(self.results)

src/p/y/pykka-HEAD/tests/future_test.py   pykka(Download)
 
from pykka import Timeout
from pykka.future import Future, ThreadingFuture, get_all
 
 
    def test_get_all_blocks_until_all_futures_are_available(self):
        self.results[0].set(0)
        self.results[1].set(1)
        self.results[2].set(2)
        result = get_all(self.results)
    def test_get_all_can_be_called_multiple_times(self):
        self.results[0].set(0)
        self.results[1].set(1)
        self.results[2].set(2)
        result1 = get_all(self.results)
        result2 = get_all(self.results)

src/p/y/pykka-HEAD/tests/namespace_test.py   pykka(Download)
    def test_get_all_import(self):
        from pykka import get_all as get_all1
        from pykka.future import get_all as get_all2
        self.assertEqual(get_all1, get_all2)
 

src/p/y/Pykka-1.2.0/tests/namespace_test.py   Pykka(Download)
    def test_get_all_import(self):
        from pykka import get_all as get_all1
        from pykka.future import get_all as get_all2
        self.assertEqual(get_all1, get_all2)