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

Add async helpers to Schedulers #857

Merged

Commits on Nov 13, 2022

  1. Add async helpers to Schedulers

    Credits to @pointfreeco for the work done in:
    https://github.com/pointfreeco/combine-schedulers
    
    ## Changes
    
    - Add new `async` APIs to `DateScheduler` to enable waiting for them in
    asynchronous contexts:
      + `sleep(for:leeway) async`
      + `sleep(until:leeway) async`
      + `timer(interval:leeway) async`
    
    - Add new `async` variants `TestScheduler`'s `advance` and `run` APIs,
    to enable waiting for them in asynchronous contexts:
      + `advance()` async`
      + `advance(by:) async` (`DispatchTimeInterval` and `TimeInterval`)
      + `advance(to:) async`
      + `run() async`
    
    - Refactor `TestScheduler.advance(to:)`'s loop condition to be based on
    `_currentDate` instead of `scheduledActions.count` to be consistent
    with the new `async` variant.
    
    - Add `NSRecursiveLock.withLock` implementation for older OS versions.
    p4checo committed Nov 13, 2022
    Configuration menu
    Copy the full SHA
    d222a44 View commit details
    Browse the repository at this point in the history