Skip to content

Synchronous methods of ISubscriber #44

@rogeralsing

Description

@rogeralsing

Question, why are the methods in reactive streams synchronous?

https://github.com/reactive-streams/reactive-streams-dotnet/blob/master/src/api/Reactive.Streams/ISubscriber.cs#L51

What if the subscriber is async ?
Forcing sync, you need a buffer (e.g. actor mailbox).

This buffer can either:

  • Block when full (breaking the idea of reactive streams)
  • Grow to infinity (causing OOM)
  • Drop at head or tail, (also breaking the idea of reactive streams)

What am I missing in this equation?
The only way I can see this working out w/o issues is if the subscriber signas demand for every single element. my impression is/was that this is not the case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions