From 48ba680bf876e8592edb3410c4c7fae72381b0b0 Mon Sep 17 00:00:00 2001 From: adamw Date: Fri, 5 Jan 2024 20:28:44 +0100 Subject: [PATCH] Minor fixes --- core/src/main/java/com/softwaremill/jox/Channel.java | 1 - core/src/main/java/com/softwaremill/jox/Segment.java | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/softwaremill/jox/Channel.java b/core/src/main/java/com/softwaremill/jox/Channel.java index 5ebcc12..8bd4b49 100644 --- a/core/src/main/java/com/softwaremill/jox/Channel.java +++ b/core/src/main/java/com/softwaremill/jox/Channel.java @@ -121,7 +121,6 @@ public Channel() { /** * Creates a buffered channel (when capacity is positive), or a rendezvous channel if the capacity is 0. - * Capacity cannot be negative. */ public Channel(int capacity) { if (capacity < UNLIMITED_CAPACITY) { diff --git a/core/src/main/java/com/softwaremill/jox/Segment.java b/core/src/main/java/com/softwaremill/jox/Segment.java index b36c07e..e846d2e 100644 --- a/core/src/main/java/com/softwaremill/jox/Segment.java +++ b/core/src/main/java/com/softwaremill/jox/Segment.java @@ -41,11 +41,11 @@ private enum State { private final AtomicInteger pointers_notProcessedAndInterrupted; private final boolean isRendezvousOrUnlimited; - Segment(long id, Segment prev, int pointers, boolean isRendezvous) { + Segment(long id, Segment prev, int pointers, boolean isRendezvousOrUnlimited) { this.id = id; this.prev = new AtomicReference<>(prev); this.pointers_notProcessedAndInterrupted = new AtomicInteger(SEGMENT_SIZE + (pointers << POINTERS_SHIFT)); - this.isRendezvousOrUnlimited = isRendezvous; + this.isRendezvousOrUnlimited = isRendezvousOrUnlimited; } long getId() {