lecture 07

This commit is contained in:
SowinskiBraeden committed 2026-10-20 11:28:07 -07:00
1 parent d729786437
commit 73653f078e
7 files changed
+165

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
-module(counter_supervisor).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-define(TABLE, counter_table).
start_link() ->
ets:new(?TABLE, [named_table, public]),
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init(_) ->
Flags = #{strategy => one_for_one},
ChildSpecs = [#{id => worker1,
staart => {counter_worker, start_link, [0]}}],
{ok, {Flags, ChildSpecs}}.