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

Commit e41611d7 authored by Miao Wang's avatar Miao Wang Committed by android-build-merger
Browse files

Merge "[RenderScript] Interrupt mMessageThread when tearing down context." am: 9f2a1979

am: b02f7b0a

* commit 'b02f7b0a':
  [RenderScript] Interrupt mMessageThread when tearing down context.

Change-Id: Icc19c3d04f3b33f928ef6f61b4a42471d51736b5
parents 63e3e038 b02f7b0a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.