https://github.com/pikdum/atomvm_elixir_supervisor_example
atomvm elixir supervisor + genserver example
https://github.com/pikdum/atomvm_elixir_supervisor_example
atomvm elixir
Last synced: 8 months ago
JSON representation
atomvm elixir supervisor + genserver example
- Host: GitHub
- URL: https://github.com/pikdum/atomvm_elixir_supervisor_example
- Owner: pikdum
- License: unlicense
- Created: 2025-09-03T00:47:35.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-09-03T01:29:33.000Z (9 months ago)
- Last Synced: 2025-10-04T04:55:15.205Z (8 months ago)
- Topics: atomvm, elixir
- Language: Elixir
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SupervisorExample
Working example of how to use Supervisors + GenServers with AtomVM in Elixir
Ported from: https://github.com/atomvm/atomvm_lib/tree/e5ec0248e0286effebcbc0ad70cc9f7228f463ae/examples/application_example
```console
$ mix atomvm.packbeam && atomvm supervisor_example.avm
No avm_deps directory found.
This message can be safely ignored when standard libraries are already flashed to lib partition.
Starting Supervisor...
Starting Worker...
Tick 0
Tick 1
Tick 2
Tick 3
Tick 4
Boom!
CRASH
======
pid: <0.4.0>
Stacktrace:
[{Elixir.SupervisorExample.Worker,handle_info,2,[]},{gen_server,loop,3,[{file,"/home/pikdum/code/AtomVM/libs/estdlib/src/gen_server.erl"},{line,551}]}]
cp: #CP
x[0]: exit
x[1]: boom
x[2]: {2,1,56,1,[{4,3160},{10,187}],exit}
Stack
-----
#CP
[]
[]
[]
#{counter=>5}
[]
{state,undefined,Elixir.SupervisorExample.Worker,#{counter=>5}}
<0.3.0>
#CP
Mailbox
-------
Monitors
--------
link to <0.3.0>
**End Of Crash Report**
Starting Worker...
Tick 0
Tick 1
```