> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::g_async_logger_shutdown_in_progress

> Global flag indicating that an async logger shutdown is in progress.

Global flag indicating that an async logger shutdown is in progress.

```cpp showLineNumbers={false}
std::atomic<bool> holoscan::g_async_logger_shutdown_in_progress = {false}
```

This flag is used in the Python bindings to prevent Python GIL deadlock during shutdown. When the main thread holds the GIL and waits for worker threads to join, worker threads must not try to acquire the GIL (e.g., for Python object serialization) or deadlock will occur.

This is a C++17 inline variable ensuring a single instance across all translation units. The accessor function provides a clean interface for reading/writing the flag.

The flag is set at the start of stop\_worker\_threads() and reset at the start of start\_worker\_threads().