am 67775422: Retry if interrupted before mMessageThread has joined
* commit '677754225d9dcd3982d486bc4ead31d6f74de89b': Retry if interrupted before mMessageThread has joined
This commit is contained in:
committed by
Android Git Automerger
commit
24f0248317
@@ -1557,9 +1557,16 @@ public class RenderScript {
|
||||
|
||||
nContextDeinitToClient(mContext);
|
||||
mMessageThread.mRun = false;
|
||||
try {
|
||||
mMessageThread.join();
|
||||
} catch(InterruptedException e) {
|
||||
|
||||
// Wait for mMessageThread to join. Try in a loop, in case this thread gets interrupted
|
||||
// during the wait.
|
||||
boolean hasJoined = false;
|
||||
while (!hasJoined) {
|
||||
try {
|
||||
mMessageThread.join();
|
||||
hasJoined = true;
|
||||
} catch(InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
nContextDestroy();
|
||||
|
||||
Reference in New Issue
Block a user