package
Version:
v1.17.0
Opens a new window with list of versions in this module.
Published: Dec 2, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Queue[T any] struct {
}
Queue is a simple concurrent safe queue
New is a constructor for a new concurrent safe queue.
func (q *Queue[T]) Copy() []T
Copy get the copy of queue.
func (q *Queue[T]) Last() T
Last returns the last of item.
Len returns the number of items in this queue.
func (q *Queue[T]) Pop() T
Pop returns the head of items.
func (q *Queue[T]) Put(items ...T)
Put add the item to the queue.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.