From 03855bbe4a55668d6834514f83f8c2276e9dc594 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 25 Jan 2011 00:26:25 -0800 Subject: Fix bug 3385881 Launch signals and threads are not always matched in index. Threads grab launch indexes as they start which may not be the order in which they were launched. Change-Id: I1ff42c3df5d7ebb46de6329ebd11ef67a5fc58ca --- libs/rs/rsContext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/rs/rsContext.cpp') diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 11d0bdce8784..40cb5c746e47 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -735,6 +735,8 @@ Context::~Context() { mWorkers.mRunningCount = (int)mWorkers.mCount; for (uint32_t ct = 0; ct < mWorkers.mCount; ct++) { mWorkers.mLaunchSignals[ct].set(); + } + for (uint32_t ct = 0; ct < mWorkers.mCount; ct++) { int status = pthread_join(mWorkers.mThreadId[ct], &res); } rsAssert(!mWorkers.mRunningCount); -- cgit v1.2.3-59-g8ed1b