Skip to content

Conversation

samuel-williams-shopify
Copy link
Contributor

@samuel-williams-shopify samuel-williams-shopify commented Sep 5, 2025

Add waiter invalidation to prevent abandoned waiters from accumulating in the @waiting heap when exceptions occur during dequeue operations.

  • Add Waiter#invalidate! method that nullifies fiber and condition.
  • Add Waiter#valid? method to check if waiter is still usable.
  • Add ensure block in dequeue to invalidate waiters on exceptions.

Types of Changes

  • Bug fix.

Contribution

@samuel-williams-shopify samuel-williams-shopify force-pushed the priority-queue-waiter-invalidation branch from 3450a9c to 98c4235 Compare September 5, 2025 22:56
@ioquatix ioquatix changed the title Better handling of waiter invalidation in PriorityQueue. Better handling of waiter invalidation in PriorityQueue. Sep 5, 2025
@samuel-williams-shopify samuel-williams-shopify force-pushed the priority-queue-waiter-invalidation branch from 98c4235 to b192abd Compare September 5, 2025 22:59
Add waiter invalidation to prevent abandoned waiters from accumulating
in the @waiting heap when exceptions occur during dequeue operations.

- Add Waiter#invalidate! method that nullifies fiber and condition.
- Add Waiter#valid? method to check if waiter is still usable.
- Add ensure block in dequeue to invalidate waiters on exceptions.
@samuel-williams-shopify samuel-williams-shopify force-pushed the priority-queue-waiter-invalidation branch from b192abd to 7de6caf Compare September 5, 2025 23:02
@ioquatix ioquatix merged commit 7f571e7 into main Sep 5, 2025
73 of 79 checks passed
@ioquatix ioquatix deleted the priority-queue-waiter-invalidation branch September 5, 2025 23:23
@samuel-williams-shopify samuel-williams-shopify added this to the v2.29.1 milestone Sep 6, 2025
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