/** * Construct a looper instance operating in <code>continuous</code> modes. {@link Looper#loop()} implementation should * wait for some IO events or explicit sleep to avoid abusing the thread. */ protected AbstractLooper() { this.thread = new LooperThread(this); }
/** * Construct a looper instance operation in <code>periodic</code> mode. * * @param period loop iteration period, in milliseconds. * @throws IllegalArgumentException if <code>period</code> argument is not strict positive. */ protected AbstractLooper(int period) { Params.strictPositive(period, "Looper period"); this.thread = new LooperThread(this, period); }