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)
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()
def shutdown(*, context=None): global __executor if __executor is not None: __executor.shutdown() __executor = None _shutdown(context=context)
def shutdown(): global __executor if __executor is not None: __executor.shutdown() __executor = None _shutdown()