UID:88075
UID:2095
引用第7楼dbzhang800于2010-01-26 13:06发表的 :
UID:7394
引用第6楼darlings于2010-01-26 12:35发表的 :重入是什么意思呀?
the terms reentrant and thread-safe are used to mark classes and functions to indicate how they can be used in multithread applications: * A thread-safe function can be called simultaneously from multiple threads, even when the invocations use shared data, because all references to the shared data are serialized. * A reentrant function can also be called simultaneously from multiple threads, but only if each invocation uses its own data.Hence, a thread-safe function is always reentrant, but a reentrant function is not always thread-safe.
Although QObject is reentrant, the GUI classes, notably QWidget and all its subclasses, are not reentrant. They can only be used from the main thread. As noted earlier, QCoreApplication::exec() must also be called from that thread.
引用第4楼dbzhang800于2010-01-26 09:54发表的 :QAxWidget 是 QWidget 的派生类,而 QWidget 和它的所有子类都是不可重入的。
UID:88244
引用第3楼darlings于2010-01-26 09:49发表的 :线程创建我也是粗略地看了下,代码如下://线程 MyThread* thread= new MyThread; thread->wordActive = wordActive; thread->start();.......
UID:81635