Skip to content

Consider accepting immediate return values #3

@clue

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions