projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f9abb9
)
opj_thread_pool: fix potential deadlock at thread pool destruction
author
Even Rouault
<even.rouault@spatialys.com>
Thu, 8 Sep 2016 07:43:36 +0000
(09:43 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Thu, 8 Sep 2016 07:43:36 +0000
(09:43 +0200)
src/lib/openjp2/thread.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/thread.c
b/src/lib/openjp2/thread.c
index 59b5d87ee9a9e059349f86c40991a9f96bf3183e..fce563d033dd288856dfc9888e5050dfd9664ec2 100644
(file)
--- a/
src/lib/openjp2/thread.c
+++ b/
src/lib/openjp2/thread.c
@@
-930,7
+930,9
@@
void opj_thread_pool_destroy(opj_thread_pool_t* tp)
int i;
opj_thread_pool_wait_completion(tp, 0);
+ opj_mutex_lock(tp->mutex);
tp->state = OPJWTS_STOP;
+ opj_mutex_unlock(tp->mutex);
for(i=0;i<tp->worker_threads_count;i++)
{