1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

ocl: fixes for OpenCL multiple contexts support

This commit is contained in:
Alexander Alekhin
2020-09-03 07:41:03 +00:00
parent 2129c72bc0
commit 8711653530
4 changed files with 13 additions and 7 deletions
+6 -1
View File
@@ -1416,7 +1416,10 @@ static TlsAbstraction* getTlsAbstraction()
#ifdef WINRT
static __declspec( thread ) void* tlsData = NULL; // using C++11 thread attribute for local thread data
TlsAbstraction::TlsAbstraction() {}
TlsAbstraction::~TlsAbstraction() {}
TlsAbstraction::~TlsAbstraction()
{
cv::__termination = true; // DllMain is missing in static builds
}
void* TlsAbstraction::getData_() const
{
return tlsData;
@@ -1440,6 +1443,7 @@ TlsAbstraction::TlsAbstraction()
}
TlsAbstraction::~TlsAbstraction()
{
cv::__termination = true; // DllMain is missing in static builds
#ifndef CV_USE_FLS
TlsFree(tlsKey);
#else // CV_USE_FLS
@@ -1472,6 +1476,7 @@ TlsAbstraction::TlsAbstraction()
}
TlsAbstraction::~TlsAbstraction()
{
cv::__termination = true; // DllMain is missing in static builds
if (pthread_key_delete(tlsKey) != 0)
{
// Don't use logging here