On Fri, 2005-10-28 at 03:50 +0000, MythTV wrote: > #341: Music database update does not reread metadata > ------------------------------------+--------------------------------------- > Reporter: eskil <[EMAIL PROTECTED]> | Owner: ijr > Type: patch | Status: closed > Priority: minor | Milestone: 0.19 > Component: mythmusic | Version: head > Severity: low | Resolution: fixed > ------------------------------------+--------------------------------------- > Comment (by ijr): > > Daniel, err, stuff's not right in your comments/code. 'deleteLater' is > only useful for deleting a QObject from the non-Qt thread, Yep, I'm sorry if I said something different. I actually started writing up a proper an explanation of this last night.
> or when there may be pending events delivered. It is still safe to use plain old delete in the Qt event thread in the presence of posted events, only a QApp::sendEvent() from outside the event thread are unsafe. AFAIC, AutoExpire is the only class that uses this unsafe event dispatch. > It doesn't really do anything at all for signals/slots, so the > 'deleteLater's that you've added here aren't doing anything useful at all. My fear was that MythBusyDialog might be deleted from a thread other than a Qt thread because it is a busy dialog. BTW deleteLater() does prevent the class from being deleted while you are receiving a signal from the Qt event thread (a timer event say). But you do need to disconnect() all the signals you are getting from other threads, and disconnect() is no more thread safe than signal emission itself. I wish trolltech had made the signal/slot mechanism thread-safe by default, and then added the option of doing your own more fine grained locking. -- Daniel
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
