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

Arrow 2.0 release notes #312

Closed
wants to merge 3 commits into from
Closed

Arrow 2.0 release notes #312

wants to merge 3 commits into from

Conversation

serras
Copy link
Member

@serras serras commented May 29, 2024

It's never too early to start with this.

@serras serras requested a review from nomisRev May 29, 2024 19:26
@serras serras self-assigned this May 29, 2024
Comment on lines 45 to 48
The new `awaitAll` scope tries to improve the situation by tweaking the
usual `async` mechanism, ensuring that all `Deferred` values are `await`ed
once the first one is requested. That means that the previous code behaves
identically to the following.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new documentation in a DRAFT PR that explains the actual issue. This is an example:

coroutineScope {
     val x = async { awaitCancellation() }
     val y = async { throw CancellationException("Boom!") }
     ...
 }

This hangs forever, which means this also hangs forever:

either {
  coroutineScope {
     val x = async { awaitCancellation() }
     val y = async { raise("Boom!") }
     ...
   }
 }

And awaitAll solves that issue by actually awaiting all parallel jobs in parallel. More elaborate here, https://github.com/arrow-kt/arrow/pull/3443/files#diff-eba615458a6921b379f1477f70993424b278b3de927ece7e998c5bf7dba6f7f0R38

Comment on lines +76 to +79
```kotlin
Schedule.recurs<Throwable>(2)
.retry<IllegalArgumentException, _> { ... }
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comment, I think it is important we can call doWhile on IllegalArgumentException here as well.

@serras serras mentioned this pull request Oct 3, 2024
@serras
Copy link
Member Author

serras commented Oct 3, 2024

Closed as part of #333

@serras serras closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants