core(tls): implement releasing of TLS on thread termination

- move TLS & instrumentation code out of core/utility.hpp
- (*) TLSData lost .gather() method (to dispose thread data on thread termination)
- use TLSDataAccumulator for reliable collecting of thread data
- prefer using of .detachData() + .cleanupDetachedData() instead of .gather() method

(*) API is broken: replace TLSData => TLSDataAccumulator if gather required
(objects disposal on threads termination is not available in accumulator mode)
This commit is contained in:
Alexander Alekhin
2019-10-13 11:14:41 +00:00
parent dd4f591d54
commit 17e2bf5717
14 changed files with 650 additions and 239 deletions
+2
View File
@@ -4,6 +4,8 @@
#include "test_precomp.hpp"
#include "opencv2/core/utils/logger.hpp"
#include "test_utils_tls.impl.hpp"
namespace opencv_test { namespace {
static const char * const keys =