Merge "[RenderScript] Interrupt mMessageThread when tearing down context."
am: 9f2a1979a7
* commit '9f2a1979a750788f572709fe13c66a917ba8fdf8':
[RenderScript] Interrupt mMessageThread when tearing down context.
Change-Id: Ie2b99b85e22b3e871111e33785565f8159939112
This commit is contained in:
@@ -1616,6 +1616,9 @@ public class RenderScript {
|
||||
|
||||
nContextDeinitToClient(mContext);
|
||||
mMessageThread.mRun = false;
|
||||
// Interrupt mMessageThread so it gets to see immediately that mRun is false
|
||||
// and exit rightaway.
|
||||
mMessageThread.interrupt();
|
||||
|
||||
// Wait for mMessageThread to join. Try in a loop, in case this thread gets interrupted
|
||||
// during the wait. If interrupted, set the "interrupted" status of the current thread.
|
||||
|
||||
Reference in New Issue
Block a user