Module qtjambi
Package io.qt

Class QThreadAffinityException

All Implemented Interfaces:
Serializable

public class QThreadAffinityException
extends RuntimeException
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:
QObject.thread(), Serialized Form
  • 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