How to use the pykka.ActorRegistry.stop_all function in pykka

To help you get started, we’ve selected a few pykka examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mopidy / mopidy / tests / mpd / protocol / __init__.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
github mopidy / mopidy / tests / local / test_library.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
        actor.LocalBackend.libraries = []
github mopidy / mopidy / tests / core / test_actor.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
        shutil.rmtree(self.temp_dir)
github lostcontrol / poupool / test / test_actor.py View on Github external
def poupool_actor():
    yield MyPoupoolActor.start().proxy()
    pykka.ActorRegistry.stop_all()
github mopidy / mopidy / tests / local / test_playback.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
github mopidy / mopidy / tests / local / test_tracklist.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
github mopidy / mopidy / tests / core / test_events.py View on Github external
def tearDown(self):  # noqa: N802
        pykka.ActorRegistry.stop_all()
github jodal / pykka / pykka / _actor.py View on Github external
envelope.reply_to.set_exception()
                else:
                    self._handle_failure(*sys.exc_info())
                    try:
                        self.on_failure(*sys.exc_info())
                    except Exception:
                        self._handle_failure(*sys.exc_info())
            except BaseException:
                exception_value = sys.exc_info()[1]
                logger.debug(
                    '{!r} in {}. Stopping all actors.'.format(
                        exception_value, self
                    )
                )
                self._stop()
                ActorRegistry.stop_all()

        while not self.actor_inbox.empty():
            envelope = self.actor_inbox.get()
            if envelope.reply_to is not None:
                if isinstance(envelope.message, messages._ActorStop):
                    envelope.reply_to.set(None)
                else:
                    envelope.reply_to.set_exception(
                        exc_info=(
                            ActorDeadError,
                            ActorDeadError(
                                '{} stopped before handling the message'.format(
                                    self.actor_ref
                                )
                            ),
                            None,