On Sunday 25 September 2005 07:38 pm, Daniel Kristjansson wrote: > On Sun, 2005-09-25 at 18:48 -0400, Isaac Richards wrote: > > And that anything that inherits from QObject should only be > > created/destroyed by the main Qt event loop thread? > >> You do realize that signals are sent & received by the same thread, right? > Yep, it is just used to send a QWaitCondition::wakeAll()...
I've just been using regular function calls instead of signals in new code. Easier, generally, especially if it never needs to be connected generically. > I found the documentation for this... > http://doc.trolltech.com/3.3/threads.html > > It is ok to create a QObject outside of the Qt event thread, > but it can not be deleted while another class is sending it > a signal (for obvious reasons...) Pretty sure it's creation, too. Last I checked the Qt source, at least, it was. > To avoid needing to disconnect all slots before deletion, > QObject contains a "deleteLater()" method that queues it > up for proper deletion the next time the event loop runs. Signals are sent immediately, though. They aren't queued at all. > I'll make sure I use this on the recorders, and I'll check the > other QObject classes I know about... It's just a race condition, really - shouldn't _crash_ things, but still would be good to fix. Isaac
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
