Skip to content

Commit

Permalink
fix typespecs in UtilitySupervisor (#681)
Browse files Browse the repository at this point in the history
* fix typespecs in UtilitySupervisor

* update changelog
  • Loading branch information
mat-hek authored Nov 20, 2023
1 parent cd5b007 commit 4d8691c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Specify the order in which state fields will be printed in the error logs. [#614](https://github.com/membraneframework/membrane_core/pull/614)
* Fix clock selection [#626](https://github.com/membraneframework/membrane_core/pull/626)
* Log messages in the default handle_info implementation [#680](https://github.com/membraneframework/membrane_core/pull/680)
* Fix typespecs in Membrane.UtilitySupervisor [#681](https://github.com/membraneframework/membrane_core/pull/681)

## 1.0.0
* Introduce `:remove_link` action in pipelines and bins.
Expand Down
10 changes: 8 additions & 2 deletions lib/membrane/utility_supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,22 @@ defmodule Membrane.UtilitySupervisor do

@doc """
Starts a process under the utility supervisor.
Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`.
"""
@spec start_child(t, Supervisor.child_spec()) :: Supervisor.on_start_child()
@spec start_child(t, Supervisor.child_spec() | {module(), term()} | module()) ::
Supervisor.on_start_child()
defdelegate start_child(supervisor, child_spec),
to: Membrane.Core.SubprocessSupervisor,
as: :start_utility

@doc """
Starts a process under the utility supervisor and links it to the current process.
Semantics of the `child_spec` argument is the same as in `Supervisor.child_spec/2`.
"""
@spec start_link_child(t, Supervisor.child_spec()) :: Supervisor.on_start_child()
@spec start_link_child(t, Supervisor.child_spec() | {module(), term()} | module()) ::
Supervisor.on_start_child()
defdelegate start_link_child(supervisor, child_spec),
to: Membrane.Core.SubprocessSupervisor,
as: :start_link_utility
Expand Down

0 comments on commit 4d8691c

Please sign in to comment.