Skip to content

Is runFork really the preferred method for running effects? #864

@tmcw

Description

@tmcw

What is the type of issue?

Documentation is confusing

What is the issue?

The docs for runFork say that

Unless you have a specific need for a Promise or a synchronous operation, Effect.runFork is the recommended choice.

This is confusing to me:

The only example of using runFork in the running effects documentation is extremely contrived - if I wanted to, say, "get the result of the effect," I have no idea how to do that. It seems like i'd interrupt the fiber intermittently until it returns, but that seems weird, inefficient, and very different from the norms of promises or async/await or anything else in TS, and there are no examples of doing that.

Where did you find it?

https://effect.website/docs/guides/essentials/running-effects#runfork

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions