Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
b5cdc03b
Commit
b5cdc03b
authored
Dec 11, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Dec 11, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1972 from alalek:ocl_queue_cleanup_hung
parents
d802b4d1
bdbd3eb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
ocl.cpp
modules/core/src/ocl.cpp
+8
-3
precomp.hpp
modules/core/src/precomp.hpp
+3
-0
system.cpp
modules/core/src/system.cpp
+7
-2
No files found.
modules/core/src/ocl.cpp
View file @
b5cdc03b
...
...
@@ -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
);
}
}
}
...
...
modules/core/src/precomp.hpp
View file @
b5cdc03b
...
...
@@ -249,6 +249,9 @@ namespace ocl
MatAllocator
*
getOpenCLAllocator
();
}
extern
bool
__termination
;
// skip some cleanups, because process is terminating
// (for example, if ExitProcess() was already called)
}
#endif
/*_CXCORE_INTERNAL_H_*/
modules/core/src/system.cpp
View file @
b5cdc03b
...
...
@@ -734,18 +734,23 @@ cvErrorFromIppStatus( int status )
}
}
namespace
cv
{
bool
__termination
=
false
;
}
#if defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
#ifdef HAVE_WINRT
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
#endif
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
);
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
,
LPVOID
);
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
)
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
lpReserved
)
{
if
(
fdwReason
==
DLL_THREAD_DETACH
||
fdwReason
==
DLL_PROCESS_DETACH
)
{
if
(
lpReserved
!=
NULL
)
// called after ExitProcess() call
cv
::
__termination
=
true
;
cv
::
deleteThreadAllocData
();
cv
::
deleteThreadData
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment