Sync surface destruction with main thread (#3368)

This commit is contained in:
Adrian Cojocaru
2025-04-09 14:58:10 +03:00
committed by GitHub
parent d693898757
commit 802586ed52
3 changed files with 20 additions and 0 deletions

View File

@@ -84,6 +84,14 @@ abstract class TextureViewRenderThread extends Thread implements TextureView.Sur
this.destroySurface = true;
this.requestRender = false;
lock.notifyAll();
while (this.hasNativeSurface) {
try {
lock.wait();
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
}
}
return true;
}