qt5base-lts/tests/auto/other/qobjectrace
Olivier Goffart f805020410 Fix a race that occurred as we unlock the mutex to destroy the functor in ~QObject
When we unlock the mutex, we need to take in account that the Connection
pointed by 'node' may be destroyed in another thread while it is unlocked
Doing  'node->prev = &node'  will make sure that 'node' is actually
updated when it is destroyed.

Setting isSlotObject under the mutex is safer and ensure that no other
thread will attempt to deref the object.

The regression was introduced in 5885b8f775

tst_qobjectrace was updated to catch races arising when we are
connecting with function pointers.

Change-Id: Ia0d11ae8df563dad97eb86993a786b579b28cd03
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-11-26 08:24:25 +01:00
..
.gitignore Moved integrationtests/* into other/ 2011-11-30 09:30:22 +01:00
qobjectrace.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qobjectrace.cpp Fix a race that occurred as we unlock the mutex to destroy the functor in ~QObject 2013-11-26 08:24:25 +01:00