摘要: 本文转自http://blog.csdn.net/wangwenhui11/article/details/6760474private static ExecutorService exec = new ThreadPoolExecutor(8, 8, 0L,TimeUnit.MILLISECONDS, new LinkedBlockingQueue(100000),new ThreadPoolExecutor.CallerRunsPolicy());一、简介 线程池类为 java.util.concurrent.ThreadPoolExecutor,常用构造方法为: ThreadPoolE 阅读全文
posted @ 2013-09-06 16:18 xumin_minzi 阅读(68) 评论(0) 推荐(0)
摘要: 烧写好系统后,想往system/app下push一个apk,提示remount failed: Operation not permitted。解决方案如下: 1. 进入shell adb shell 2. shell下输入命令 shell@android:/ $ sushell@android:/ # mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /systemshell@android:/ # chmod 777 /systemshell@android:/ # cd systemshell@android:/system # c.. 阅读全文
posted @ 2013-09-06 16:13 xumin_minzi 阅读(932) 评论(0) 推荐(0)
摘要: CountDownLatch,一个同步辅助类,在完成一组正在其他线程中执行的操作之前,它允许一个或多个线程一直等待。主要方法 public CountDownLatch(int count); public void countDown(); public void await() throws InterruptedException 构造方法参数指定了计数的次数countDown方法,当前线程调用此方法,则计数减一awaint方法,调用此方法会一直阻塞当前线程,直到计时器的值为0 例子Java代码 收藏代码 public class CountDownLatchDemo { ... 阅读全文
posted @ 2013-09-06 16:09 xumin_minzi 阅读(91) 评论(0) 推荐(0)