コード例 #1
0
ファイル: __init__.py プロジェクト: suab321321/VCS
def shutdown(*, context: Context = None) -> None:
    """
    Shutdown a previously initialized context.

    This will also shutdown the global executor.

    :param context: The context to invalidate. If ``None``, then the default context is used
        (see :func:`.get_default_context`).
    """
    global __executor
    if __executor is not None:
        __executor.shutdown()
        __executor = None
    _shutdown(context=context)
コード例 #2
0
def shutdown(*,
             context: Context = None,
             uninstall_handlers: Optional[bool] = None) -> None:
    """
    Shutdown a previously initialized context.

    This will also shutdown the global executor.

    :param context: The context to invalidate. If ``None``, then the default context is used
        (see :func:`.get_default_context`).
    :param uninstall_handlers:
        If `None`, signal handlers will be uninstalled when shutting down the default context.
        If `True`, signal handlers will be uninstalled.
        If not, signal handlers won't be uninstalled.
    """
    _shutdown(context=context)
    if (uninstall_handlers
            or (uninstall_handlers is None and
                (context is None or context is get_default_context()))):
        uninstall_signal_handlers()
コード例 #3
0
ファイル: __init__.py プロジェクト: thomas-moulard/rclpy
def shutdown(*, context=None):
    global __executor
    if __executor is not None:
        __executor.shutdown()
        __executor = None
    _shutdown(context=context)
コード例 #4
0
def shutdown():
    global __executor
    if __executor is not None:
        __executor.shutdown()
        __executor = None
    _shutdown()