3. You should already know ...
http://stackoverflow.com/questions/200469/what-is-the-difference-between-a-process-and-a-thread
4. You should already know ...
http://nerds.weddingpartyapp.com/tech/2014/06/20/primer-threading-handlers-android/
5. You should already know...
https://www3.ntu.edu.sg/home/ehchua/programming/java/J5e_multithreading.html
6. Concurrency issues
What is the most frequent concurrency issue you've encountered in Java?
http://stackoverflow.com/questions/461896/what-is-the-most-frequent-
concurrency-issue-youve-encountered-in-java
7. Problem
class MyThread extends Thread {
private boolean stop = false;
public void run() {
while(!stop) {
doSomeWork();
}
}
public void setStop() {
this.stop = true;
}
調用了setStop(),
卻可能仍然不會停下。