py_context_sup (erlang_python v3.0.0)

View Source

Supervisor for py_context processes.

This is a simple_one_for_one supervisor that manages py_context processes. New contexts are started via start_context/2.

Summary

Functions

Start a new py_context under this supervisor.

Start the supervisor.

Stop a context by its PID.

List all running context PIDs.

Functions

start_context(Id, Mode)

-spec start_context(term(), py_context:context_mode()) -> {ok, pid()} | {error, term()}.

Start a new py_context under this supervisor.

start_link()

-spec start_link() -> {ok, pid()} | {error, term()}.

Start the supervisor.

stop_context(Pid)

-spec stop_context(pid()) -> ok | {error, term()}.

Stop a context by its PID.

which_contexts()

-spec which_contexts() -> [pid()].

List all running context PIDs.