public interface Looper
loop() implementation should consider that thread checks for interruption state between loops -
for this reason blocking IO read operations are not allowed.
This interface is designed to work with LooperThread, see sample code below.
class DemoLooper implements Looper {
private LooperThread thread;
DemoLooper() {
tread = new LooperThread(this);
thread.start();
}
void stop() {
thread.stop();
}
void loop() throws Exception {
...
}
}
| Modifier and Type | Method and Description |
|---|---|
void |
loop()
Execute a single processing loop.
|
Copyright © 2018. All rights reserved.