Skip to content

[Question AsyncThrowingSequence] Should failure resume and fail all producers/consumers #155

Closed
@twittemb

Description

@twittemb

Hi,

We’ve recently merged a PR #152 where the finish operation instantly resumes all the pending producers and consumers (with a nil value), thus ending all the iterators.

I was wondering if we should have the same behaviour for failures. As it is a terminal event, we have the same kind of risk for infinite suspensions. I guess when sending a failure, all the pending operations should resume instantly. All the awaiting consumers should receive the failure and the future iterations should also resume instantly.

@phausler what do you think ?

The fail(_:) function would also be not async. It makes sense since, as a terminal event, no back pressure should be applied.

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