提交 43753d6e 编写于 作者: D dongeforever

Polish makeStop for ServiceThread

上级 38554a08
...@@ -97,7 +97,7 @@ public abstract class ServiceThread implements Runnable { ...@@ -97,7 +97,7 @@ public abstract class ServiceThread implements Runnable {
@Deprecated @Deprecated
public void stop(final boolean interrupt) { public void stop(final boolean interrupt) {
if (!started.compareAndSet(true, false)) { if (!started.get()) {
return; return;
} }
this.stopped = true; this.stopped = true;
...@@ -113,7 +113,7 @@ public abstract class ServiceThread implements Runnable { ...@@ -113,7 +113,7 @@ public abstract class ServiceThread implements Runnable {
} }
public void makeStop() { public void makeStop() {
if (!started.compareAndSet(true, false)) { if (!started.get()) {
return; return;
} }
this.stopped = true; this.stopped = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册