Skip to content

Conversation

@JoshVanL
Copy link
Contributor

Update the event control loop implementation to dynamically grow the event queue when it reaches capacity. This change allows the loop to handle a larger number of events without blocking Enqueue, removing issues of circular dependencies in certain scenarios.

Queues are now split into segments, each with the given fixed size. When the current segments are full, a new segment is allocated and linked to the end of the queue. This allows the queue to grow as needed. Uses sync.Pool to reduce allocations for segments.

Update the event control loop implementation to dynamically grow the
event queue when it reaches capacity. This change allows the loop to
handle a larger number of events without blocking Enqueue, removing
issues of circular dependencies in certain scenarios.

Queues are now split into segments, each with the given fixed size. When
the current segments are full, a new segment is allocated and linked to
the end of the queue. This allows the queue to grow as needed. Uses
`sync.Pool` to reduce allocations for segments.

Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL requested review from a team as code owners November 13, 2025 20:23
Signed-off-by: joshvanl <me@joshvanl.dev>
Copy link
Contributor

@cicoyle cicoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tweak I noticed and suggested - great job 🎉

Signed-off-by: joshvanl <me@joshvanl.dev>
@cicoyle cicoyle merged commit 2fd5d0c into dapr:main Nov 17, 2025
6 checks passed
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