Skip to content

qtthread_interface

QThread_interface

Mimic forward declaration of QRPCManager.

Source code in client/ayon_comfyui/api/qtthread_interface.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class QThread_interface:  # noqa: N801
    """Mimic forward declaration of QRPCManager."""

    sig_onheartbeat_fail: SignalInstance
    sig_onfrontendcon_fail: SignalInstance

    def schedule(
        self, function: Callable, *args: list[Any], **kwargs: dict[str:Any]
    ) -> None:
        """Schedule a function in the thread."""

    @property
    def server_thread(self) -> ThreadLike:
        """Get Server Thread for RPC."""

    @property
    def static_server_thread(self) -> ThreadLike:
        """Get Static Server Thread for RPC."""

    @property
    def ws_pulse_client(self):  # noqa :ANN201
        """Get WS client to pulse backend."""

server_thread property

Get Server Thread for RPC.

static_server_thread property

Get Static Server Thread for RPC.

ws_pulse_client property

Get WS client to pulse backend.

schedule(function, *args, **kwargs)

Schedule a function in the thread.

Source code in client/ayon_comfyui/api/qtthread_interface.py
22
23
24
25
def schedule(
    self, function: Callable, *args: list[Any], **kwargs: dict[str:Any]
) -> None:
    """Schedule a function in the thread."""

ThreadLike

Expose stop function.

Source code in client/ayon_comfyui/api/qtthread_interface.py
 9
10
11
12
13
class ThreadLike:
    """Expose stop function."""

    def stop(self) -> None:
        """Set event flag of this thread to stop execution."""

stop()

Set event flag of this thread to stop execution.

Source code in client/ayon_comfyui/api/qtthread_interface.py
12
13
def stop(self) -> None:
    """Set event flag of this thread to stop execution."""