Specifies the scheduler on which to receive elements from the publisher.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
The scheduler the publisher is to use for element delivery.
Scheduler options that customize the element delivery.
A publisher that delivers elements using the specified scheduler.
You use the
receive(on: operator to receive results on a specific scheduler, such as performing UI work on the main run loop. In contrast with
subscribe(on:, which affects upstream messages,
receive(on: changes the execution context of downstream messages. In the following example, requests to
json are performed on
background, but elements received from it are performed on