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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user