Skip to content

Conversation

@joy999
Copy link
Contributor

@joy999 joy999 commented Oct 26, 2025

add TQueue

@joy999 joy999 requested a review from Copilot October 26, 2025 06:39
@joy999 joy999 added the feature label Oct 26, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a generic queue implementation (TQueue[T]) to the gqueue package, enabling type-safe queue operations while maintaining backward compatibility with the existing non-generic Queue type.

Key changes:

  • Added a new generic TQueue[T any] type with type-safe methods
  • Refactored existing Queue to use embedded TQueue[any] for backward compatibility
  • Eliminated code duplication by consolidating queue logic in the generic implementation

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
container/gqueue/gqueue_t.go New file implementing generic TQueue[T] with all core queue operations
container/gqueue/gqueue.go Refactored to embed TQueue[any] and delegate method calls, reducing code duplication

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gogf gogf deleted a comment from Copilot AI Nov 28, 2025
@hailaz hailaz merged commit 8575f01 into master Nov 28, 2025
20 checks passed
@hailaz hailaz deleted the feat/t_queue branch November 28, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants