From 850ae6ed7b3f53378cef46aaca6c3f12d0e169f4 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Wed, 29 Apr 2026 07:55:46 +0200 Subject: [PATCH] csys: revert: scope in process dict -> explicit param --- lib/csys/csys.ex | 4 ++-- lib/csys/program.ex | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/csys/csys.ex b/lib/csys/csys.ex index d59c9b4..4ecbcce 100644 --- a/lib/csys/csys.ex +++ b/lib/csys/csys.ex @@ -19,8 +19,8 @@ defmodule Scopes.CSys do # helper functions defp process(msg, scope) do - Process.put(:scope, scope) - proc(scope).(msg) + #Process.put(:scope, scope) + proc(scope).(msg, scope) end def state(scope), do: elem(scope, 0) diff --git a/lib/csys/program.ex b/lib/csys/program.ex index 9d012ce..0f1d75c 100644 --- a/lib/csys/program.ex +++ b/lib/csys/program.ex @@ -9,7 +9,7 @@ defmodule Scopes.CSys.Program do # programs def basic_prog() do - %{default: &std_proc/1 + %{default: &std_proc/2 #initial: &std_proc/1, #active: &std_proc/1, #retired: &std_proc/1 @@ -18,8 +18,8 @@ defmodule Scopes.CSys.Program do # processors - def std_proc(msg) do - scope = Process.get(:scope) + def std_proc(msg, scope) do + #scope = Process.get(:scope) case msg do {:parent} -> new = create_parent(scope)