Skip to content

Commit

Permalink
Release 0.5.11
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Feb 7, 2025
1 parent b7bdd32 commit fb77463
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ the project!
To test Ox, use the following dependency, using either [sbt](https://www.scala-sbt.org):

```scala
"com.softwaremill.ox" %% "core" % "0.5.10"
"com.softwaremill.ox" %% "core" % "0.5.11"
```

Or [scala-cli](https://scala-cli.virtuslab.org):

```scala
//> using dep "com.softwaremill.ox::core:0.5.10"
//> using dep "com.softwaremill.ox::core:0.5.11"
```

Documentation is available at [https://ox.softwaremill.com](https://ox.softwaremill.com), ScalaDocs can be browsed at [https://javadoc.io](https://www.javadoc.io/doc/com.softwaremill.ox).
Expand Down
2 changes: 1 addition & 1 deletion generated-doc/out/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Safe direct-style concurrency and resiliency for Scala on the JVM. Requires JDK 21 & Scala 3.

To start using Ox, add the `com.softwaremill.ox::core:0.5.10` [dependency](info/dependency.md) to your project.
To start using Ox, add the `com.softwaremill.ox::core:0.5.11` [dependency](info/dependency.md) to your project.
Then, take a look at the tour of Ox, or follow one of the topics listed in the menu to get to know Ox's API!

In addition to this documentation, ScalaDocs can be browsed at [https://javadoc.io](https://www.javadoc.io/doc/com.softwaremill.ox).
Expand Down
4 changes: 2 additions & 2 deletions generated-doc/out/info/dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ To use ox core in your project, add:

```scala
// sbt dependency
"com.softwaremill.ox" %% "core" % "0.5.10"
"com.softwaremill.ox" %% "core" % "0.5.11"

// scala-cli dependency
//> using dep com.softwaremill.ox::core:0.5.10
//> using dep com.softwaremill.ox::core:0.5.11
```

Ox core depends only on the Java [jox](https://github.com/softwaremill/jox) project, where channels are implemented. There are no other direct or transitive dependencies.
Expand Down
2 changes: 1 addition & 1 deletion generated-doc/out/integrations/cron4s.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dependency:

```scala
"com.softwaremill.ox" %% "cron" % "0.5.10"
"com.softwaremill.ox" %% "cron" % "0.5.11"
```

This module allows to run schedules based on cron expressions from [cron4s](https://github.com/alonsodomin/cron4s).
Expand Down
2 changes: 1 addition & 1 deletion generated-doc/out/integrations/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dependency:

```scala
"com.softwaremill.ox" %% "kafka" % "0.5.10"
"com.softwaremill.ox" %% "kafka" % "0.5.11"
```

`Flow`s which read from a Kafka topic, mapping stages and drains which publish to Kafka topics are available through
Expand Down
2 changes: 1 addition & 1 deletion generated-doc/out/integrations/mdc-logback.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dependency:

```scala
"com.softwaremill.ox" %% "mdc-logback" % "0.5.10"
"com.softwaremill.ox" %% "mdc-logback" % "0.5.11"
```

Ox provides support for setting inheritable MDC (mapped diagnostic context) values, when using the [Logback](https://logback.qos.ch)
Expand Down
2 changes: 1 addition & 1 deletion generated-doc/out/streaming/flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ To obtain a `org.reactivestreams.Publisher` instance, you'll need to add the fol
bring the `toReactiveStreamsPublisher` method into scope:

```scala
// sbt dependency: "com.softwaremill.ox" %% "flow-reactive-streams" % "0.5.10"
// sbt dependency: "com.softwaremill.ox" %% "flow-reactive-streams" % "0.5.11"

import ox.supervised
import ox.flow.Flow
Expand Down
21 changes: 0 additions & 21 deletions generated-doc/out/streaming/transforming-channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,6 @@ these channels by default is 16 (buffered). This can be overridden by providing
(v: Source[Int]).map(_ + 1)(using BufferCapacity(10))
```

## Transforming lazily

A limited number of transformations can be applied to a source without creating a new channel and a new fork, which
computes the transformation. These include: `.mapAsView`, `.filterAsView` and `.collectAsView`.

For example:

```scala
import ox.channels.{Channel, Source}

val c = Channel.rendezvous[String]
val c2: Source[Int] = c.mapAsView(s => s.length())
```

The mapping function (`s => s.length()`) will only be invoked when the source is consumed (using `.receive()` or
`select`), on the consumer's thread. This is in contrast to `.map`, where the mapping function is invoked on a separate
fork.

Hence, creating views doesn't need to be run within a scope, and creating the view itself doesn't consume any elements
from the source on which it is run.

## Discharging channels

Values of a source can be discharged using methods such as `.foreach`, `.toList`, `.pipeTo` or `.drain`:
Expand Down

0 comments on commit fb77463

Please sign in to comment.