mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-31 22:35:37 +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);
|
SystemClock.sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (true) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
handleEvent();
|
handleEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ public final class DeviceMessageSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void loop() throws IOException, InterruptedException {
|
public void loop() throws IOException, InterruptedException {
|
||||||
while (true) {
|
while (!Thread.currentThread().isInterrupted()) {
|
||||||
String text;
|
String text;
|
||||||
long sequence;
|
long sequence;
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
Reference in New Issue
Block a user