多线程Runnable任务执行注意

public class ImplRunnable implements Runnable { String thread_name; int line = 10;//关键的共享变量 @Override public void run() { synchronized (this){//确保每一个任务只执行一次 for(;0 < line;line--) System.out
相关文章
相关标签/搜索