Skip to content

Add graceful default signal handlers#4

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
add-graceful-default-signals
Jun 29, 2026
Merged

Add graceful default signal handlers#4
samuel-williams-shopify merged 1 commit into
mainfrom
add-graceful-default-signals

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds async/signals/graceful, which immediately installs default SIGINT and SIGTERM handlers that raise Interrupt on Thread.main. Existing non-default traps are preserved.

This provides a shared graceful shutdown policy for libraries like Async and Async::Container without each caller needing to install its own process signal traps.

Validation

  • bundle exec rubocop -A
  • bundle exec sus test/async/signals/graceful.rb --verbose
  • bundle exec bake decode:index:coverage lib
  • COVERAGE=PartialSummary bundle exec sus
  • bundle exec bake covered:validate --paths .covered.db

@samuel-williams-shopify samuel-williams-shopify force-pushed the add-graceful-default-signals branch 4 times, most recently from 2f8912c to d06263c Compare June 29, 2026 01:44
@samuel-williams-shopify

Copy link
Copy Markdown
Contributor Author

I dislike this approach.

@samuel-williams-shopify samuel-williams-shopify deleted the add-graceful-default-signals branch June 29, 2026 02:21
@samuel-williams-shopify samuel-williams-shopify restored the add-graceful-default-signals branch June 29, 2026 05:24
@samuel-williams-shopify samuel-williams-shopify force-pushed the add-graceful-default-signals branch 2 times, most recently from 89a278f to 2619a35 Compare June 29, 2026 05:32
@samuel-williams-shopify samuel-williams-shopify force-pushed the add-graceful-default-signals branch from 2619a35 to 181b148 Compare June 29, 2026 05:35
@samuel-williams-shopify

Copy link
Copy Markdown
Contributor Author

This is the lesser of two slightly problematic approaches.

@samuel-williams-shopify samuel-williams-shopify merged commit 870dd5b into main Jun 29, 2026
39 checks passed
@samuel-williams-shopify samuel-williams-shopify deleted the add-graceful-default-signals branch June 29, 2026 05:39
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.

1 participant