A simple version of HandlerThread ported from Android to Java