ocl: process termination hung workaround

This commit is contained in:
Alexander Alekhin
2013-12-11 00:31:34 +04:00
parent d802b4d143
commit bdbd3eb2bf
3 changed files with 18 additions and 5 deletions

View File

@@ -1932,10 +1932,15 @@ struct Queue::Impl
~Impl()
{
if(handle)
#ifdef _WIN32
if (!cv::__termination)
#endif
{
clFinish(handle);
clReleaseCommandQueue(handle);
if(handle)
{
clFinish(handle);
clReleaseCommandQueue(handle);
}
}
}