Back to project page jpstrack.android.
The source code is released under:
/* * Copyright (c) 2006-2014 Ian F. Darwin, http://darwinsys.com * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following co...
If you think the Android project jpstrack.android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package jpstrack.android; /*from www . j ava 2s .c om*/ import java.util.concurrent.Executor; import java.util.concurrent.Executors; public class ThreadUtils { private final static Executor threadpool = Executors.newFixedThreadPool(1); public static void execute(final Runnable r) { threadpool.execute(r); } static void executeAndWait(final Runnable r) { Thread t = new Thread(r); t.start(); try { t.join(); } catch (InterruptedException e) { throw new RuntimeException("Interrupted, eh? DOH!" + e); } } }