Summary: | Review: utilities/cameragui/mtqueue.h use bad locking style | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | lan |
Component: | Import-MainView | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED INTENTIONAL | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 0.7.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Better locking style |
Description
lan
2004-11-01 11:14:19 UTC
Created attachment 8121 [details]
Better locking style
Forgot to add: this patch also remove lock() and unlock() methods in mtqueue and aslo make method head() without argument. These methods are not used at now. can you give me an example of a case where the mutex will not be unlocked? And digikam doesn't use exceptions. QMutexLocker is just a convenience function for locking and unlocking mutex, so that the programmer doesn't have to remember to unlock the mutex for each scenario. You are right, where are can be any exceptions. That is why original code is working right. I just thought it would be better to make code nicer. not using qmutexlocker is not a sin :) |