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

Replace futures with async publisher #1130

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Replace futures with async publisher #1130

wants to merge 9 commits into from

Conversation

defagos
Copy link
Member

@defagos defagos commented Feb 3, 2025

Description

Currently we use futures to perform async work. Tasks started this way will never be properly cancellable. To improve this behavior this PR introduces a publisher whose subscription manages a cancellable task.

Changes made

  • Add AsyncPublisher, a publisher that performs an async unit of work.
  • Improve existing publisher implementations (no change in behavior, only code moved around).
  • Require Swift 6.0 for compilation (the async publisher uses typed throws internally).
  • Update all futures wrapping async code to use the new AsyncPublisher.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@defagos defagos self-assigned this Feb 3, 2025
@defagos defagos added the enhancement New feature or request label Feb 3, 2025
@defagos defagos enabled auto-merge February 3, 2025 08:57
@defagos defagos added this pull request to the merge queue Feb 3, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🍿 Code Review
Development

Successfully merging this pull request may close these issues.

2 participants