mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-30 22:05:12 +00:00
Terminate loop explicitly on interrupted
Make explicit that the loop terminates when the current thread is interrupted.
This commit is contained in:
@@ -75,7 +75,7 @@ public class Controller {
|
||||
SystemClock.sleep(500);
|
||||
}
|
||||
|
||||
while (true) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
handleEvent();
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ public final class DeviceMessageSender {
|
||||
}
|
||||
|
||||
public void loop() throws IOException, InterruptedException {
|
||||
while (true) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
String text;
|
||||
long sequence;
|
||||
synchronized (this) {
|
||||
|
Reference in New Issue
Block a user