// Path: core/src/main/java/com/github/phantomthief/util/MoreSuppliers.java
// public static <T> CloseableSupplier<T> lazy(Supplier<T> delegate) {
//     return lazy(delegate, true);
// }


import static com.github.phantomthief.util.MoreSuppliers.lazy;
import java.util.Collection;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nonnull;
package com.github.phantomthief.pool.impl;




/**
 * @author w.vela
 * Created on 2020-08-19.
 */
class LazyBlockingQueue<E> implements BlockingQueue<E> {

    private final Supplier<BlockingQueue<E>> factory;

    LazyBlockingQueue(@Nonnull Supplier<BlockingQueue<E>> factory) {
// Path: core/src/main/java/com/github/phantomthief/util/MoreSuppliers.java
// public static <T> CloseableSupplier<T> lazy(Supplier<T> delegate) {
//     return lazy(delegate, true);
// }


// Path: core/src/main/java/com/github/phantomthief/pool/impl/LazyBlockingQueue.java
import static com.github.phantomthief.util.MoreSuppliers.lazy;
import java.util.Collection;
import java.util.Iterator;
import java.util.Spliterator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.Supplier;
import javax.annotation.Nonnull;

package com.github.phantomthief.pool.impl;




/**
 * @author w.vela
 * Created on 2020-08-19.
 */
class LazyBlockingQueue<E> implements BlockingQueue<E> {

    private final Supplier<BlockingQueue<E>> factory;

    LazyBlockingQueue(@Nonnull Supplier<BlockingQueue<E>> factory) {
        this.factory = lazy(factory);