Example usage for io.netty.util.internal PlatformDependent newMpscQueue

List of usage examples for io.netty.util.internal PlatformDependent newMpscQueue

Introduction

In this page you can find the example usage for io.netty.util.internal PlatformDependent newMpscQueue.

Prototype

public static <T> Queue<T> newMpscQueue() 

Source Link

Document

Create a new Queue which is safe to use for multiple producers (different threads) and a single consumer (one thread!).

Usage

From source file:com.addthis.hydra.query.FileRefSource.java

License:Apache License

FileRefSource(ChannelMaster master) {
    super(master);
    this.references = PlatformDependent.newMpscQueue();
    this.semaphore = new StampedLock();
    // throw away a writeLock so that we can immediately park the consumer
    this.semaphore.writeLock();
    this.shortCircuited = false;
}