←back to thread

175 points nateb2022 | 3 comments | | HN request time: 0.685s | source
Show context
Fire-Dragon-DoL ◴[] No.41522089[source]
How does the supervision tree look like? My major problem with go are goroutines bringing down tge whole software
replies(1): >>41527028 #
helsinki ◴[] No.41527028[source]
How?
replies(1): >>41527242 #
1. Fire-Dragon-DoL ◴[] No.41527242[source]
The syntax for declaring it, sorry
replies(2): >>41527403 #>>41527478 #
2. mh- ◴[] No.41527403[source]
I'm not the person you're replying to, but this left me with more questions than answers, haha. Can you expand on what you mean?
3. Fire-Dragon-DoL ◴[] No.41527478[source]
What's the equivalent of this: https://hexdocs.pm/elixir/supervisor-and-application.html

    defmodule KV.Supervisor do
      use Supervisor

      def start_link(opts) do
        Supervisor.start_link(__MODULE__, :ok, opts)
      end

      @impl true
      def init(:ok) do
        children = [
          KV.Registry
        ]

        Supervisor.init(children, strategy: :one_for_one)
      end
    end
In ergo