Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call off start_child when the group leader terminates #470

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

jonatanklosko
Copy link
Member

Example

defmodule Slow do
  use GenServer

  def start_link(time) do
    GenServer.start_link(__MODULE__, time, name: __MODULE__)
  end

  def init(time) do
    Process.sleep(time)
    {:ok, time}
  end
end

Kino.start_child({Slow, 10_000})

When we "Evaluate" and "Stop" (which terminates the evaluator), the child still ends up starting. Consequently, if we try to evaluate again (which starts a new evaluator), we get :already_started, because the process is still under the kino supervision tree.

@hugobarauna
Copy link
Member

we get :already_started

I got this yesterday while starting a FLAME Pool. Felt weird, but it worked at the end.

Maybe it was related to this bug. If yes, hopefully fixed now. 😊

@jonatanklosko jonatanklosko merged commit a085ab8 into main Sep 19, 2024
1 check passed
@jonatanklosko jonatanklosko deleted the jk-start-child-gl branch September 19, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants