Search in sources :

Example 1 with SigIntBarrier

use of org.agrona.concurrent.SigIntBarrier in project nd4j by deeplearning4j.

the class LowLatencyMediaDriver method main.

@SuppressWarnings("checkstyle:UncommentedMain")
public static void main(final String... args) {
    MediaDriver.loadPropertiesFiles(args);
    setProperty(DISABLE_BOUNDS_CHECKS_PROP_NAME, "true");
    setProperty("aeron.mtu.length", "16384");
    setProperty("aeron.socket.so_sndbuf", "2097152");
    setProperty("aeron.socket.so_rcvbuf", "2097152");
    setProperty("aeron.rcv.initial.window.length", "2097152");
    final MediaDriver.Context ctx = new MediaDriver.Context().threadingMode(ThreadingMode.DEDICATED).dirsDeleteOnStart(true).termBufferSparseFile(false).conductorIdleStrategy(new BusySpinIdleStrategy()).receiverIdleStrategy(new BusySpinIdleStrategy()).senderIdleStrategy(new BusySpinIdleStrategy());
    try (MediaDriver ignored = MediaDriver.launch(ctx)) {
        new SigIntBarrier().await();
    }
}
Also used : SigIntBarrier(org.agrona.concurrent.SigIntBarrier) MediaDriver(io.aeron.driver.MediaDriver) BusySpinIdleStrategy(org.agrona.concurrent.BusySpinIdleStrategy)

Aggregations

MediaDriver (io.aeron.driver.MediaDriver)1 BusySpinIdleStrategy (org.agrona.concurrent.BusySpinIdleStrategy)1 SigIntBarrier (org.agrona.concurrent.SigIntBarrier)1