Skip to content

durable: fold the stacked effect-dispatch wrappers into one dispatch #254

Open

Description

@reka18

What happens

After #235, effect dispatch runs through stacked single-line wrappers: dispatchEffects calls dispatch, which calls dispatchWith with nil, and dispatchReplayEffects also calls dispatchWith. Error and panic wrapping is split between applyEffect and dispatchWith. A reader has to trace three forwarding functions to reach the loop.

Suggested cleanup

Fold them into one dispatch(ctx, id, des, seen), passing nil from the live path, so there is one loop and one place that wraps errors and panics. No behavior change; the existing dispatch tests cover it.

Relates to: #235

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions