
kunna
Concurrent Data Processing in Elixir: JobSupervisor does not go down (page 54)
After finishing Chapter 2, Long-Running Processes Using GenServer, I was able to successfully run the code. but if I see the process observer, I can see the JobSupervisor processes still alive. Is this the expected behavior? If I have created 100,000 jobs, there will be 100,000 active supervisors.
This is how my supervision tree looks like when triggered 3 jobs. 2 jobs are finished.
[Elixir.Jobber.JobRunner] – [<0.176.6>]
– [<0.191.0>]
– [<0.194.0>] — [<0.223.0>]
Most Liked

svilen

svilen
No problem at all @kunna.
If a child is being restarted, then which_children/1
will return :restarting
for the second element in the tuple, so you can use that in combination with count_children/1
. Please see the documentation for which_children/1.
Yes, you can make a JobTerminator
GenServer that does that.
Popular Prag Prog topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /centos
- /ash
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /django
- /spring
- /diversity
- /nodejs
- /lua
- /slackware
- /julia
- /c
- /neovim