Skip to content

feat: add AutoQueue - #21

Open
dxman wants to merge 1 commit into
chickensoft-games:mainfrom
dxman:auto-queue
Open

feat: add AutoQueue#21
dxman wants to merge 1 commit into
chickensoft-games:mainfrom
dxman:auto-queue

Conversation

@dxman

@dxman dxman commented Aug 2, 2026

Copy link
Copy Markdown

AutoQueue is basically a variation on AutoChannel, which separates the acts of sending and broadcasting messages, by storing them in a BoxlessQueue. This allows users to defer processing of messages until the desired time.

Example usage:

public readonly record struct MyMessage(int Value);
// ...
var autoQueue = new AutoQueue();
var binding = autoQueue.Bind()
  .OnDequeue<MyMessage>((in msg) => GD.Print($"Value = {msg.Value}"))
// ...
autoQueue.Enqueue(new MyMessage(5));
// ...
while (autoQueue.HasValues)
{
  autoQueue.Dequeue();
}

@Bastani
Bastani self-requested a review August 2, 2026 19:54
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