Effect CommunityEC
Effect Community3y ago
4 replies
whatplan

Using `runFork` Inside Effects: Understanding the Difference

should runFork be used inside effects?
is it is in the docs

my understanding was to only using run* functions at the edges of your program, and never within effects

although it looks like runFork is a bit different in that it spawns a new fiber and runs it immediately, where the normal fork waits for the current fiber to yield or until Fiber.join is called

If this is the case, and runFork can be used inside effects, maybe consider not putting it under run* (confusing when the rest are very explictly not meant to be used in effects)

maybe like forkNow or forkAndRun
A fully-fledged functional effect system for TypeScript with a rich standard library
Deferred – Effect
Was this page helpful?