Ë
    �©ïg^  ã                  óˆ   — d dl mZ ddlmZmZmZmZ ddlmZ ddl	m
Z
 d dlmZmZ d dlZg d¢Z	 	 dd	dd
œ	 	 	 	 	 	 	 	 	 dd„Zy)é    )Úannotationsé   )ÚQAsyncioEventLoopPolicyÚQAsyncioEventLoopÚQAsyncioHandleÚQAsyncioTimerHandle)ÚQAsyncioFuture)ÚQAsyncioTask)Ú	CoroutineÚAnyN)r   r   r   r   r	   r
   F)Úhandle_sigintÚdebugc               óp  — t        j                  «       }t        j                  t        ||¬«      «       d}d}|r:| rt        j                  | «       t        j
                  «       j                  «        n%| rt        j                  | |¬«      }nt        d«      }t        j                  |«       |r|S |r|‚y)aj  
    Run the QtAsyncio event loop.

    If there is no instance of a QCoreApplication, QGuiApplication or
    QApplication yet, a new instance of QCoreApplication is created.

    :param coro:            The coroutine to run. Optional if keep_running is
                            True.
    :param keep_running:    If True, QtAsyncio (the asyncio event loop) will
                            continue running after the coroutine finished, or
                            run "forever" if no coroutine was provided.
                            If False, QtAsyncio will stop after the
                            coroutine finished. A coroutine must be provided if
                            this argument is set to False.
    :param quit_qapp:       If True, the QCoreApplication will quit when
                            QtAsyncio (the asyncio event loop) stops.
                            If False, the QCoreApplication will remain active
                            after QtAsyncio stops, and can continue to be used.
    :param handle_sigint:   If True, the SIGINT signal will be handled by the
                            event loop, causing it to stop.
    :param debug:           If True, the event loop will run in debug mode.
                            If False, the event loop will run in normal mode.
                            If None, the default behavior is used.
    )Ú	quit_qappr   N)r   zbQtAsyncio was set not to keep running after the coroutine finished, but no coroutine was provided.)	ÚasyncioÚget_event_loop_policyÚset_event_loop_policyr   Úensure_futureÚget_event_loopÚrun_foreverÚrunÚRuntimeError)ÚcoroÚkeep_runningr   r   r   Údefault_policyÚretÚexcs           ú:lib/python3.12/site-packages/PySide6/QtAsyncio/__init__.pyr   r      s¨   € ôJ ×2Ñ2Ó4€NÜ×!Ñ!Ü¨)À=ÔQôSð €CØ
€CáÙÜ×!Ñ! $Ô'Ü×ÑÓ ×,Ñ,Õ.áÜ—+‘+˜d¨%Ô0‰Cäð;ó<ˆCô ×!Ñ! .Ô1á
Øˆ
Ù
Øˆ	ð ó    )NTT)r   zCoroutine | Noner   Úboolr   r    r   r    r   zbool | NoneÚreturnr   )Ú
__future__r   Úeventsr   r   r   r   Úfuturesr	   Útasksr
   Útypingr   r   r   Ú__all__r   © r   r   Ú<module>r)      si   ðõ #÷ó õ $Ý ç !ã ò€ð "&Ø59ð=ØTYØ!ñ=Øð=Ø.2ð=ØMQð=àð=à&)ô=r   