Skip to content

Consider accepting immediate return values #3

Description

@clue

Right now, the Transformer expects the transformation handler to return a promise.

It would be a rather simple addition to also forward immediate return values and any exceptions just like the promise resolution values. Arguably, relying on immediate return values means that it can no longer handle concurrent operations and effectively mimics ReactPHP's ThroughStream. However, in particular throwing exceptions is a rather common use case (not necessarily intentionally) and it may make sense to also forward this as an error event accordingly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    easy pickGood for newcomershelp wantedExtra attention is needednew featureNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions