Skip to content

Commit

Permalink
Add "since" annotations in PartitionSupervisor
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Aug 29, 2023
1 parent 9321f2f commit 1877762
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/elixir/lib/partition_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ defmodule PartitionSupervisor do
`name` is the name of the `PartitionSupervisor` and key is used
for routing.
This module was introduced in Elixir v1.14.0.
## Simple Example
Let's start with an example which is not useful per se, but shows how the
Expand All @@ -29,7 +31,7 @@ defmodule PartitionSupervisor do
end
def init(args) do
IO.inspect [__MODULE__, " got args ", args, " in ", self()]
IO.inspect([__MODULE__, " got args ", args, " in ", self()])
{:ok, _initial_state = []}
end
Expand All @@ -39,7 +41,7 @@ defmodule PartitionSupervisor do
def handle_call({:collect, msg}, _from, state) do
new_state = [msg | state]
IO.inspect ["current messages:", new_state, " in process", self()]
IO.inspect(["current messages:", new_state, " in process", self()])
{:reply, :ok, new_state}
end
end
Expand Down Expand Up @@ -134,6 +136,8 @@ defmodule PartitionSupervisor do
you can use `GenServer.whereis({:via, PartitionSupervisor, {name, key}})`.
"""

@moduledoc since: "1.14.0"

@behaviour Supervisor

@registry PartitionSupervisor.Registry
Expand Down

0 comments on commit 1877762

Please sign in to comment.