NK
Size: a a a
NK
m
в Фениксе есть контексты, они нужны для того-то, и они не имеют НИКАКОГО ОТНОШЕНИЯ к DDD и Bounded Contexts
m
ЕР
m
m
ЕР
ŹR
AU
AU
AU
AU
YT
YT
iex(1)> try do
...(1)> exit(:jopa)
...(1)> catch :exit, _ -> IO.inspect("JOPA")
...(1)> end
"JOPA"
"JOPA"
iex(2)> try do
...(2)> Process.exit(self, :jopa)
...(2)> catch :exit, _ -> IO.inspect("JOPA")
...(2)> end
** (EXIT from #PID<0.132.0>) shell process exited with reason: :jopa
Interactive Elixir (1.9.4) - press Ctrl+C to exit (type h() ENTER for help)
YT
VP
...
The following behaviour applies if reason is any term except :normal or :kill:
1. If pid is not trapping exits, pid will exit with the given reason.
2. If pid is trapping exits, the exit signal is transformed into a message {:EXIT, from, reason} and delivered to the message queue of pid.
YT
...
The following behaviour applies if reason is any term except :normal or :kill:
1. If pid is not trapping exits, pid will exit with the given reason.
2. If pid is trapping exits, the exit signal is transformed into a message {:EXIT, from, reason} and delivered to the message queue of pid.
YT
VS
exit/1
- синхронное прерывание, внутри процессаexit/2
- асинхронное, приходит извне try/catch
ловят только синхронныеYT
exit/1
- синхронное прерывание, внутри процессаexit/2
- асинхронное, приходит извне try/catch
ловят только синхронные