[Qt-interest] unix SIGUSR1 signal on QT
Dmitry Erlih
derlih at unison.com
Thu Feb 10 17:25:09 CET 2011
There is another way to do so: create a local tcp server in separate thread. When signal handler called, you can write something to that server. Then you can invoke your slots asynchronously.
It gives you a guarantee that all your slots will be called from server's thread asynchronously.
10.02.2011, в 19:03, Thiago Macieira написал(а):
> Em quinta-feira, 10 de fevereiro de 2011, às 10:56:00, Dmitry Erlih escreveu:
>> I think you can call slot QTimer::singleshot(0, SLOT(yourslot())) or
>> QMetaObject::invokeMethod with Qt::QueuedConnection from unix signal
>> handler.
>
> That's a bad idea.
>
> Do not call any Qt function from a Unix signal handler.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Senior Product Manager - Nokia, Qt Development Frameworks
> PGP/GPG: 0x6EF45358; fingerprint:
> E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
________________________________
This message (including attachments) is private and confidential. If you have received this message in error, please notify us and remove it from your system.
More information about the Qt-interest-old
mailing list