Skip to content

Instantly share code, notes, and snippets.

View chuanwang66's full-sized avatar
🎯
Focusing

Sam chuanwang66

🎯
Focusing
View GitHub Profile
背景文章:看android内核需要看什么——
《Android系统和linux内核的关系详解》
http://blog.sciencenet.cn/blog-618303-626146.html
<Binder IPC Mechanism>
http://www.angryredplanet.com/~hackbod/openbinder/docs/html/BinderIPCMechanism.html
<Android's Binder>
http://lukejin.wordpress.com/2011/03/13/android%E4%B8%AD%E7%9A%84binder/
<技术内幕: Android的IPC机制-Binder>
the following code is quite helpful to penetrate into the secrete of thread pool:
public class BoundedExecutorService {
BlockingQueue<Runnable> blockingQueue = new ArrayBlockingQueue<Runnable>(4);
RejectedExecutionHandler rejectedExecutionHandler = new ThreadPoolExecutor.CallerRunsPolicy();
private ExecutorService executorService = new ThreadPoolExecutor(2, 2, 0L, TimeUnit.MILLISECONDS,
blockingQueue, rejectedExecutionHandler);
public void execute(Runnable command) {
executorService.submit(command);