摘要:
写一个线程类,个人习惯如下:class MyWorkRunnable implements Runnable { volatile Thread mTheThread = null; @Override public void run() { if (mTheThread != Thread.currentThread()) { throw new RuntimeException();// 防止外部调用Thread.start方法启动该线程 } whi... 阅读全文