Task.await tries to exit the calling process when the timeout hits, but IEx traps the exit in that process, so it doesn't terminate and thus the linked task process doesn't either, I think? If I do all of this wrapped in another task, rather than directly in IEx, then I observe the innermost process get terminated by the process link after the intervening one doesn't trap the exit.Relevant from https://hexdocs.pm/elixir/1.4.5/Task.html, which you've probably already seen:
> If the timeout is exceeded, await will exit; however, the task will continue to run. When the calling process exits, its exit signal will terminate the task if it is not trapping exits.
dasyatidprime|1 year ago
> If the timeout is exceeded, then the caller process will exit. If the task process is linked to the caller process which is the case when a task is started with async, then the task process will also exit.
Reasoning is the same though; self() preceding/following it in the IEx session still shows the same evaluator process alive.
jonnycat|1 year ago
dasyatidprime|1 year ago