Packages

A bridge between Glamorous Toolkit (GT) and the BEAM VM, enabling remote code evaluation, object inspection, and Phlow view rendering.

Current section

Files

Jump to
gt_bridge lib evaluation_supervisor.ex
Raw

lib/evaluation_supervisor.ex

defmodule EvaluationSupervisor do
@moduledoc """
I supervise children that evaluate arbitrary Elixir code (Similar to IEx).
In particular I expect the host platform to spawn up multiple
instances of children, so I am a DynamicSupervisor.
"""
use DynamicSupervisor
def start_link(init_arg) do
DynamicSupervisor.start_link(__MODULE__, init_arg, name: __MODULE__)
end
# We don't have any children by default wait until one spawns it up
@impl true
def init(_init_arg) do
DynamicSupervisor.init(strategy: :one_for_one)
end
end