+
    lHàjÉ  ã                  ó:   € R t ^ RIHt ^ RIt^ RIHt RR R lltR# )u¿  Shared interpreter-shutdown predicate for background threads that can outlive
process teardown (cron delivery, concurrent tool submission, retry paths).

Once finalization starts, ``concurrent.futures`` refuses new work and asyncio's
default executor is gone, so any further scheduling only produces noise (stray
prints after the TUI exited, tracebacks in ``errors.log``, futile retries).
CPython raises ``cannot schedule new futures after interpreter shutdown``
(module-global flag) or ``... after shutdown`` (a pool whose ``shutdown()`` ran);
the short prefix catches both â€” safe here because every pool involved is a
module-global daemon or a ``with``-scoped local only finalization can shut down.
)ÚannotationsN)ÚOptionalc               ó    € V ^8„  d   QhRRRR/# )é   ÚexczOptional[BaseException]ÚreturnÚbool© )Úformats   "Ú?/home/ubuntu/.hermes/hermes-agent/tools/interpreter_shutdown.pyÚ__annotate__r      s   € ÷ Qñ QÐ#:ð QÀdñ Qó    c                óŒ   € \         P                  ! 4       '       d   R# V RJ;'       d    R\        V 4      P                  4       9   # )zÕTrue when the interpreter is finalizing. ``exc`` lets a caller treat an
already-raised scheduling error as a shutdown signal: the ``concurrent.futures``
flag can be set a hair before ``sys.is_finalizing()`` flips.TNzcannot schedule new futures)ÚsysÚis_finalizingÚstrÚlower)r   s   &r   Úinterpreter_shutting_downr      s9   € ô ×Ò×ÒÙØ�dˆ?×PÐPÐ<ÄÀCÃÇÁÓ@PÑPÐPr   )N)Ú__doc__Ú
__future__r   r   Útypingr   r   r	   r   r   Ú<module>r      s!   ðñ
õ #ã 
Ý ÷Qñ Qr   