QObject reentrancy and thread safety

Viewed 455

In this article, it is said that : Some of QObjects are reentrant, making it possible to use these classes from multiple threads simultaneously.

I suppose that a piece of code which is reentrant is also supposed to be thread-safe.

But, the same article continues to say that:

Note that these classes are designed to be created and used from within a single thread; creating an object in one thread and calling its functions from another thread is not guaranteed to work.

Isn't this contradictory? What does it finally mean? Can I safely call QObject functions across threads?

I have copied the relevant portion of the article below:

QObject Reentrancy

QObject is reentrant. Most of its non-GUI subclasses, such as QTimer, QTcpSocket, QUdpSocket, QFtp, and QProcess, are also reentrant, making it possible to use these classes from multiple threads simultaneously. Note that these classes are designed to be created and used from within a single thread; creating an object in one thread and calling its functions from another thread is not guaranteed to work.

1 Answers
Related