lecture 05

This commit is contained in:
SowinskiBraeden committed 2026-10-08 20:59:37 -07:00
1 parent 14dc7cdbac
commit 06c4362a87
19 files changed
+439

No files matched your search

@@ -0,0 +1,16 @@
defmodule Counter.DynamicSupervisor do
use DynamicSupervisor
def start_link(_) do
DynamicSupervisor.start_link(__MODULE__, nil, name: __MODULE__)
end
def start_worker(name) do
DynamicSupervisor.start_child(__MODULE__, {Counter.Worker, name})
end
@impl true
def init(_) do
DynamicSupervisor.init(strategy: :one_for_one)
end
end