Skip to content

Commit

Permalink
Run TestScheduler.advance(to:) on the main actor (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis authored Oct 28, 2022
1 parent 3883d72 commit 882ac01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/CombineSchedulers/TestScheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
/// Advances the scheduler to the given instant.
///
/// - Parameter instant: An instant in time to advance to.
@MainActor
public func advance(to instant: SchedulerTimeType) async {
while self.lock.sync(operation: { self.now }) <= instant {
await Task.megaYield()
Expand Down

0 comments on commit 882ac01

Please sign in to comment.