java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.qt.QThreadAffinityException
- All Implemented Interfaces:
Serializable
The QThreadAffinityException class is thrown when a QObject is used outside
its own thread.
Each QObject has thread affinity, a thread that it belongs to, which is
accessible through its thread() method. Accessing an object from outside
this thread is forbidden to avoid concurrency problems.
Qt Jambi checks if threading affinity is violated in each member of each QObject subclass. It is
possible to disable this check by setting the VM runtime parameter
io.qt.thread-check
to false
.- See Also:
-
Constructor Summary
ConstructorDescriptionQThreadAffinityException
(String message, QObject object, QThread expectedThread, QThread currentThread) Creates a new QThreadAffinityException with the given message, object and thread. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
QThreadAffinityException
public QThreadAffinityException(String message, QObject object, QThread expectedThread, QThread currentThread) Creates a new QThreadAffinityException with the given message, object and thread.- Parameters:
message
- Describes the affinity exception.object
- The object that was accessed.expectedThread
- The expected thread.currentThread
- The thread from which the access was made.
-
-
Method Details