Replies: 7 comments 4 replies
-
Indeed, Can Furthermore, Next to this, a supervisor has specific (configurable) behaviour w.r.t. ordering when it stops and stops supervised processes. Using a simple Basically: yes, there are ways to spawn processes and leak them. Though if you use higher-level constructs (like supervisors), this won't happen. Similar to how |
Beta Was this translation helpful? Give feedback.
-
Yes, Erlang-style. |
Beta Was this translation helpful? Give feedback.
-
If the root process starts with a Though I can't tell if this usage is well supported by Maybe a |
Beta Was this translation helpful? Give feedback.
-
When working with asynchronous programming, it's important to properly manage the lifecycle of threads to prevent leaks. One approach is to use a thread pool with a maximum number of threads, and to reuse threads from the pool instead of creating new ones. Another option is to use a garbage collector to automatically reclaim unused threads. As for actors, they are typically designed to be single-threaded, with each actor running in its own thread or process. This helps to simplify concurrency management and avoid race conditions. |
Beta Was this translation helpful? Give feedback.
-
Yes, managing thread lifecycle is important in asynchronous programming to prevent leaks. Using a thread pool or a garbage collector can help ensure proper management of threads. Actors are typically designed to be single-threaded to simplify concurrency management and avoid race conditions. Each actor runs in its own thread or process. |
Beta Was this translation helpful? Give feedback.
-
I'd like to chime in here and say that |
Beta Was this translation helpful? Give feedback.
-
Raised by @TristanCacqueray in https://discourse.haskell.org/t/towards-an-actor-framework-for-haskell/5929/10, based on the content of https://github.com/NicolasT/troupe/wiki/Design-Ideas/.
Beta Was this translation helpful? Give feedback.
All reactions