Revision c28204066c2d3bae989132ab15e8df437ae38f3d authored by Thiago Macieira on 02 August 2012, 14:15:22 UTC, committed by Qt by Nokia on 25 August 2012, 08:35:26 UTC
Unlocking a mutex can never throw an exception. That doesn't make
sense and our code should make sure it can't happen. Right now,
provided that the system-level functions don't throw, we don't either.

Locking a mutex cannot throw on Linux because we use futexes
directly. A non-recursive mutex is just a futex, whereas a recursive
mutex uses a mutex (a futex) to manage a lock count.

However, on other platforms, due to the freelist, there can be memory
allocation, which means it might throw std::bad_alloc. Not because of
the freelist itself (that uses malloc and will just crash if malloc
fails) but because of Q_GLOBAL_STATIC. In 5.1, the global static will
be noexcept provided the type's constructor is so too (it is, in this
case).

Change-Id: I4c562383f48de1be7827b9afb512d73eaf0792d5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
1 parent 98437f0
History
File Mode Size
ArabicShaping.txt -rw-r--r-- 15.0 KB
BidiMirroring.txt -rw-r--r-- 24.5 KB
Blocks.txt -rw-r--r-- 7.3 KB
CaseFolding.txt -rw-r--r-- 64.1 KB
DerivedAge.txt -rw-r--r-- 85.0 KB
DerivedNormalizationProps.txt -rw-r--r-- 764.9 KB
GraphemeBreakProperty.txt -rw-r--r-- 78.9 KB
LineBreak.txt -rw-r--r-- 922.3 KB
NormalizationCorrections.txt -rw-r--r-- 2.0 KB
Scripts.txt -rw-r--r-- 131.0 KB
SentenceBreakProperty.txt -rw-r--r-- 170.4 KB
SpecialCasing.txt -rw-r--r-- 16.0 KB
UnicodeData.txt -rw-r--r-- 1.3 MB
WordBreakProperty.txt -rw-r--r-- 73.5 KB

back to top