HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/fm-agent/dependencies/linux/python3.9/jpype/__pycache__/_jthread.cpython-39.pyc
a

��iG�@s2ddlZddlmZe�d�Gdd�de��ZdS)�N�)�_jcustomizerzjava.lang.Threadc@s@eZdZdZedd��Zedd��Zedd��Zedd	��Zd
S)�_JThreadzz Customizer for ``java.land.Thread``

    This adds addition JPype methods to java.lang.Thread to support
    Python.
    cCst��S)a
 Checks if a thread is attached to the JVM.

        Python automatically attaches as daemon threads when a Java method is
        called.  This creates a resource in Java for the Python thread. This
        method can be used to check if a Python thread is currently attached so
        that it can be disconnected prior to thread termination to prevent
        leaks.

        Returns:
          True if the thread is attached to the JVM, False if the thread is
          not attached or the JVM is not running.
        )�_jpype�isThreadAttachedToJVM�rr�@/usr/lib/fm-agent/dependencies/linux/python3.9/jpype/_jthread.py�
isAttachedsz_JThread.isAttachedcCst��S)an Attaches the current thread to the JVM as a user thread.

        User threads that are attached to the JVM will prevent the JVM from
        shutting down until the thread is terminated or detached.  To convert
        a daemon thread to a main thread, the thread must first be detached.

        Raises:
          RuntimeError: If the JVM is not running.
        )r�attachThreadToJVMrrrr�attach.sz_JThread.attachcCst��S)a� Attaches the current thread to the JVM as a daemon.

        Daemon threads act as background tasks and do not prevent the JVM from
        shutdown normally.  JPype automatically attaches any threads that call
        Java resources as daemon threads.  To convert a daemon thread to a user
        thread, the thread must first be detached.

        Raises:
          RuntimeError: If the JVM is not running.
        )r�attachThreadAsDaemonrrrr�attachAsDaemon;sz_JThread.attachAsDaemoncCst��S)a� Detaches a thread from the JVM.

        This function detaches the thread and frees the associated resource in
        the JVM. For codes making heavy use of threading this should be used
        to prevent resource leaks. The thread can be reattached, so there
        is no harm in detaching early or more than once. This method cannot fail
        and there is no harm in calling it when the JVM is not running.
        )r�detachThreadFromJVMrrrr�detachIs
z_JThread.detachN)	�__name__�
__module__�__qualname__�__doc__�staticmethodr	rr
rrrrrrs



r)r�r�JImplementationFor�objectrrrrr�<module>s