private static DispatchQueue createBackgroundQueue() { return new ConcurrentDispatchQueue("Apptentive Background Queue"); } }
@Override public Thread newThread(Runnable r) { return new Thread(r, getName() + " (thread-" + threadNumber.getAndIncrement() + ")"); }
/** * Creates a background queue with specified <code>name</code> and dispatch type. */ public static DispatchQueue createBackgroundQueue(String name, DispatchQueueType type) { if (type == DispatchQueueType.Serial) { return new SerialDispatchQueue(name); } if (type == DispatchQueueType.Concurrent) { return new ConcurrentDispatchQueue(name); } throw new IllegalArgumentException("Unexpected queue type: " + type); }