SIGN IN SIGN UP

Fix OpenGL runner shutdown deadlock

`OpenGLRunner.stopAndRelease()` posts work to its internal
`HandlerThread`, so the thread must remain alive until the task
completes. Otherwise, the method may never terminate.

However, `OpenGLRunner.quit()` was called before `asyncProcessor.join()`
(in particular before `SurfaceEncoder.join()`), allowing the runner to
be shut down while `SurfaceEncoder` was still running. In some cases,
`capture.stop()`, which calls `glRunner.stopAndRelease()`, was invoked
after the `HandlerThread` had already been quit, causing a deadlock.
This led to server hangs and prevented a graceful shutdown.

Fix proper ordering of shutdown and joins so the OpenGL runner stops
safely.

PR #6794 <https://github.com/Genymobile/scrcpy/pull/6794>
R
Romain Vimont committed
5284b1ecb7f1b045e405d4c6d9689c92e2951a25
Parent: a0057ef