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

Combine Interoperability: first iteration #776

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

andersio
Copy link
Member

@andersio andersio commented Apr 19, 2020

Provide explicit means to convert any Combine publisher to SignalProducer, and to convert RAS primitives to a Publisher (basic backpressure support included for Combine compliance).

Interoperability for Scheduler and Disposable is not yet considered, since they have incompatible API contracts with their Combine counterparts.

Checklist

  • Bridge from Combine
  • Bridge to Combine
  • Unit testing
  • Weak framework linkage test for deployment targets earlier than iOS 13
  • Updated CHANGELOG.md.

@andersio andersio self-assigned this Apr 19, 2020
let (shouldSendImmediately, isDemandUnlimited): (Bool, Bool) = self.state.modify { state in
guard state.hasCancelled == false else { return (false, false) }

let unsatified = state.requested - state.satisfied

Choose a reason for hiding this comment

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

[typo] unsatisfied ☺️

}

final class ProducerSubscription<S: Subscriber>: Combine.Subscription {
typealias Output = S.Output

Choose a reason for hiding this comment

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

This has been renamed to .Input

return .startUpstream
}

state.requested = state.requested + incoming

Choose a reason for hiding this comment

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

This can be rewritten state.requested += incoming

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.

None yet

3 participants