Skip to content

Instantly share code, notes, and snippets.

View edisonywh's full-sized avatar
🎯
Focusing

Edison Yap edisonywh

🎯
Focusing
View GitHub Profile
@gkaemmer
gkaemmer / Elixir_Supervision_Trees.md
Last active December 18, 2023 14:37
Quick guide to creating Elixir supervision trees from scratch

Elixir Supervision Trees Made Easy

I started with Elixir just a couple weeks after the switch from 1.4 to 1.5, so the bulk of online resources were out of date (or at least resulted in deprecation warnings). This guide is for defining Elixir 1.5 supervised modules.

It's not actually terribly complicated. It's just sometimes unclear from examples what's implemented by the language and what you actually have to implement yourself.

Say we want a supervision tree like this (where each atom is a process):

    :a

/ \