kunna

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

Author of Concurrent Data Processing in Elixir

I decided to include a short section at the end of Chapter 2, which talks about count_children/1 and which_children/1. I think they’re quite useful so should be a welcome addition. I’ll also add a clarification on the idle supervisor processes. Thanks again for your feedback @kunna!

svilen

svilen

Author of Concurrent Data Processing in Elixir

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 Top

iPaul
page 37 ANTLRInputStream input = new ANTLRInputStream(is); as of ANTLR 4 .8 should be: CharStream stream = CharStreams.fromStream(i...
New
ianwillie
Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
jeremyhuiskamp
Title: Web Development with Clojure, Third Edition, vB17.0 (p9) The create table guestbook syntax suggested doesn’t seem to be accepted ...
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
jskubick
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint. As entered, the SwitchCompat changes color to hol...
New
jonmac
The allprojects block listed on page 245 produces the following error when syncing gradle: “org.gradle.api.GradleScriptException: A prob...
New
rainforest
Hi, I’ve got a question about the implementation of PubSub when using a Phoenix.Socket.Transport behaviour rather than channels. Before ...
New
Henrai
Hi, I’m working on the Chapter 8 of the book. After I add add the point_offset, I’m still able to see acne: In the image above, I re...
New
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
malloryerik
Any thoughts on Svelte? Svelte is a radical new approach to building user interfaces. Whereas traditional frameworks like React and Vue...
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
dasdom
No chair. I have a standing desk. This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
AstonJ
Chris Seaton, the creator of TruffleRuby has died. It appears from suicide :cry: He left this note on Twitter on the weekend: And one...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New

Latest in PragProg

View all threads ❯