SILENT KILLERPanel

Current Path: > > opt > alt > python310 > lib64 > > python3.10 > > asyncio >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt/python310/lib64//python3.10//asyncio/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 1108 bytes June 03 2025 18:23:41.
__main__.py File 3379 bytes June 03 2025 18:23:41.
base_events.py File 74341 bytes June 03 2025 18:23:41.
base_futures.py File 2574 bytes June 03 2025 18:23:41.
base_subprocess.py File 8843 bytes June 03 2025 18:23:41.
base_tasks.py File 2467 bytes June 03 2025 18:23:41.
constants.py File 888 bytes June 03 2025 18:23:41.
coroutines.py File 8797 bytes June 03 2025 18:23:41.
events.py File 27346 bytes June 03 2025 18:23:41.
exceptions.py File 1633 bytes June 03 2025 18:23:41.
format_helpers.py File 2404 bytes June 03 2025 18:23:41.
futures.py File 14187 bytes June 03 2025 18:23:41.
locks.py File 14122 bytes June 03 2025 18:23:41.
log.py File 124 bytes June 03 2025 18:23:41.
mixins.py File 803 bytes June 03 2025 18:23:41.
proactor_events.py File 32541 bytes June 03 2025 18:23:41.
protocols.py File 6957 bytes June 03 2025 18:23:41.
queues.py File 8034 bytes June 03 2025 18:23:41.
runners.py File 2104 bytes June 03 2025 18:23:41.
selector_events.py File 39700 bytes June 03 2025 18:23:41.
sslproto.py File 27459 bytes June 03 2025 18:23:41.
staggered.py File 5992 bytes June 03 2025 18:23:41.
streams.py File 25749 bytes June 03 2025 18:23:41.
subprocess.py File 7405 bytes June 03 2025 18:23:41.
tasks.py File 32458 bytes June 03 2025 18:23:41.
threads.py File 790 bytes June 03 2025 18:23:41.
transports.py File 10724 bytes June 03 2025 18:23:41.
trsock.py File 5876 bytes June 03 2025 18:23:41.
unix_events.py File 51624 bytes June 03 2025 18:23:41.
windows_events.py File 33444 bytes June 03 2025 18:23:41.
windows_utils.py File 5060 bytes June 03 2025 18:23:41.

Reading File: //opt/alt/python310/lib64//python3.10//asyncio//runners.py

__all__ = 'run',

from . import coroutines
from . import events
from . import tasks


def run(main, *, debug=None):
    """Execute the coroutine and return the result.

    This function runs the passed coroutine, taking care of
    managing the asyncio event loop and finalizing asynchronous
    generators.

    This function cannot be called when another asyncio event loop is
    running in the same thread.

    If debug is True, the event loop will be run in debug mode.

    This function always creates a new event loop and closes it at the end.
    It should be used as a main entry point for asyncio programs, and should
    ideally only be called once.

    Example:

        async def main():
            await asyncio.sleep(1)
            print('hello')

        asyncio.run(main())
    """
    if events._get_running_loop() is not None:
        raise RuntimeError(
            "asyncio.run() cannot be called from a running event loop")

    if not coroutines.iscoroutine(main):
        raise ValueError("a coroutine was expected, got {!r}".format(main))

    loop = events.new_event_loop()
    try:
        events.set_event_loop(loop)
        if debug is not None:
            loop.set_debug(debug)
        return loop.run_until_complete(main)
    finally:
        try:
            _cancel_all_tasks(loop)
            loop.run_until_complete(loop.shutdown_asyncgens())
            loop.run_until_complete(loop.shutdown_default_executor())
        finally:
            events.set_event_loop(None)
            loop.close()


def _cancel_all_tasks(loop):
    to_cancel = tasks.all_tasks(loop)
    if not to_cancel:
        return

    for task in to_cancel:
        task.cancel()

    loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True))

    for task in to_cancel:
        if task.cancelled():
            continue
        if task.exception() is not None:
            loop.call_exception_handler({
                'message': 'unhandled exception during asyncio.run() shutdown',
                'exception': task.exception(),
                'task': task,
            })

SILENT KILLER Tool