This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/elixir/lib/supervisor.ex | |
+++ b/lib/elixir/lib/supervisor.ex | |
@@ -461,18 +461,25 @@ defmodule Supervisor do | |
@behaviour Supervisor | |
@opts unquote(opts) | |
+ @doc false | |
+ def should_start?(_arg), do: true | |
+ | |
@doc false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Combi do | |
def time_run(amount \\ 100_000, batch_size \\ 250) do | |
values = Enum.to_list(1..amount) | |
Toolbelt.time(fn -> values |> init(batch_size) end) |> IO.inspect(label: "Init took") | |
batches = values |> init(batch_size) | |
Toolbelt.time(fn -> next(batches) |> run(0) end) |> IO.inspect(label: "Batching took") | |
end | |
def run({:done, _}, count) do | |
IO.puts("Completed! #{count} batches") |