Skip to content

feat: Aggregate.Root shutdown policy#35

Merged
NeilMenne merged 1 commit into
masterfrom
devex-pt4
Mar 16, 2026
Merged

feat: Aggregate.Root shutdown policy#35
NeilMenne merged 1 commit into
masterfrom
devex-pt4

Conversation

@NeilMenne
Copy link
Copy Markdown
Member

While attempting to come up w/a reasonable way to specify hibernate/shutdown behavior, I tripped over an interesting GenServer "problem" :hibernate_after has a verifiable (but undocumented) interaction with things like handle_call's implicit timeout return value, first mentioned here.

I was trying to allow for both being set (e.g. let the process sleep at the 15s mark, and snapshot/exit at the 60s mark), but the hibernate_after expectation is never met (observable via :erlang.process_info(pid, :current_function)) as the timeouts took precedent instead hibernate_after. As a result, I settled on what is proposed as shutdown_policy which is defined in the @moduledoc.

Addresses #18

@NeilMenne NeilMenne requested a review from langmartin March 13, 2026 22:18
@NeilMenne NeilMenne merged commit 5f2dcd7 into master Mar 16, 2026
7 checks passed
@NeilMenne NeilMenne deleted the devex-pt4 branch March 16, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants