Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3ae9e71 authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar Committed by Android Git Automerger
Browse files

am 5fbb2452: am ca3e5aea: Merge "Retry if interrupted before mMessageThread has joined"

* commit '5fbb2452':
  Retry if interrupted before mMessageThread has joined
parents e6a4f902 5fbb2452
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1583,10 +1583,17 @@ public class RenderScript {

            nContextDeinitToClient(mContext);
            mMessageThread.mRun = false;

            // 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();