Questions about Scope and Fork in Programming
I'm still a bit unclear about the mechanics of
1. How does the "global scope" work? Is there a way to get all the fibers running in the global scope? For example to stop anything started with
2. I use
3. If I use
4. If I want to ensure that all my "long running processes" are attached to the scope used by my global runtime how can I provide that scope in all the places that need it?
Scope and fork so I've got a few questions1. How does the "global scope" work? Is there a way to get all the fibers running in the global scope? For example to stop anything started with
forkDaemon when it's time for the app to shutdown.2. I use
Layer.buildWithScope to build a single runtime I pass around my app to execute effects but I'm a bit confused about its behavior. Why doesn't buildWithScope remove Scope from R? How is the provided scope accessible to the services constructed by a layer using buildWithScope?3. If I use
Layer.buildWithScope will a forkDaemon from layer construction be attached to the global scope or to the specified scope?4. If I want to ensure that all my "long running processes" are attached to the scope used by my global runtime how can I provide that scope in all the places that need it?
