Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jox to 0.0.7 #64

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy val core: Project = (project in file("core"))
.settings(
name := "core",
libraryDependencies ++= Seq(
"com.softwaremill.jox" % "core" % "0.0.6",
"com.softwaremill.jox" % "core" % "0.0.7",
scalaTest
)
)
Expand Down
1 change: 1 addition & 0 deletions core/src/main/scala/ox/channels/Channel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ trait Sink[-T] extends ChannelState:
*/
class Channel[T](capacity: Int) extends Source[T] with Sink[T]:
protected override val delegate: JChannel[Any] = new JChannel(capacity)
override def toString: String = delegate.toString

object Channel:
/** Creates a buffered channel (when capacity is positive), or a rendezvous channel if the capacity is 0. */
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/scala/ox/channels/ChannelTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import java.util.concurrent.atomic.AtomicInteger
import scala.jdk.CollectionConverters.*

class ChannelTest extends AnyFlatSpec with Matchers with Eventually {
List(0).foreach { capacity =>
List(0, 1, 2, 100, 10000).foreach { capacity =>
s"channel with capacity $capacity" should "send and receive two spaced elements" in {
val c = Channel[Int](capacity)
scoped {
Expand Down
Loading