[Digikam-devel] [Bug 166424] Crash when editing Caption with Digikam4 SVN

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Jul 13 17:03:17 BST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=166424         




------- Additional Comments From marcel.wiesweg gmx de  2008-07-13 18:03 -------
If there are global data fields somewhere inside the library that need to be initialized once and are then read-only, we should call this from our initialization code.
Assuming that the data is only accessed "const" afterwards it should be safe to leave it open for concurrent access (*).
If accessing the data involves any kind of change to global variables, and a mutex is not used, this would taint libexiv2 as "not reentrant" and require a mutex for access. I assume this is not the case.

(*) With Qt, there is an implication with implicitly shared classes: If there are copies of a QString, with several threads each having an instance copied from the same QString, everything is all right. However the process of creating the copies is not safe: Imagine a globally accessible QString and two threads at the same time copying it with the copy constructor. This is _not_ safe and should lege artis be mutex-protected. It is safe to create instances and send them with cross-thread signals.



More information about the Digikam-devel mailing list