Skip to content
Garbage collected processes.
Elixir
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
README.md
mix.exs
mix.lock
package.exs

README.md

Process.Managed - garbage collected processes for Elixir

This small library implements garbage collected processes using the awesome NIF hack.

Example

pid = fn ->
  use Process.Managed

  p = Process.Managed.spawn fn ->
    receive do
      _ -> IO.puts "received"
    end

    receive do
      _ -> IO.puts "received again"
    end
  end

  p <- 42

  IO.inspect Process.alive?(p.to_pid) # => true

  p.to_pid
end.()

IO.inspect Process.alive?(pid) # => false
Something went wrong with that request. Please try again.