@@ -908,8 +908,7 @@ defmodule Application do
908908 `:permanent`, or `:transient`. See `t:restart_type/1` for more information.
909909
910910 * `:mode` - (since v1.15.0) if the applications should be started serially
911- (`:serial`, default) or concurrently (`:concurrent`). This option requires
912- Erlang/OTP 26+.
911+ (`:serial`, default) or concurrently (`:concurrent`).
913912
914913 """
915914 @ spec ensure_all_started ( app | [ app ] , type: restart_type ( ) , mode: :serial | :concurrent ) ::
@@ -930,18 +929,7 @@ defmodule Application do
930929
931930 def ensure_all_started ( apps , opts ) when is_list ( apps ) and is_list ( opts ) do
932931 opts = Keyword . validate! ( opts , type: :temporary , mode: :serial )
933-
934- if function_exported? ( :application , :ensure_all_started , 3 ) do
935- :application . ensure_all_started ( apps , opts [ :type ] , opts [ :mode ] )
936- else
937- # TODO: Remove this clause when we require Erlang/OTP 26+
938- Enum . reduce_while ( apps , { :ok , [ ] } , fn app , { :ok , acc } ->
939- case :application . ensure_all_started ( app , opts [ :type ] ) do
940- { :ok , apps } -> { :cont , { :ok , apps ++ acc } }
941- { :error , e } -> { :halt , { :error , e } }
942- end
943- end )
944- end
932+ :application . ensure_all_started ( apps , opts [ :type ] , opts [ :mode ] )
945933 end
946934
947935 @ doc """
0 commit comments