Skip to content

Correct Process.spawn monitor options in typespecs and documentation - #16083

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:fix/process-spawn-monitor-options
Nov 8, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
preciz:fix/process-spawn-monitor-options

Conversation

@preciz

@preciz preciz commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

The {:monitor, options} variant of Process.spawn_opt/0 requires a list of monitor options, but its type currently describes a single option.

Use [:erlang.monitor_option()] and document that this form returns {pid, reference} from both Process.spawn/2 and Process.spawn/4.

Assisted-by: Codex CLI:GPT 6.1 Sol

@josevalim
josevalim merged commit d064c28 into elixir-lang:main Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants