_1_unblock_queue

package
v0.0.0-...-a7c7adb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() (T, bool)

Pop 从队列头部取出并从头部删除对应数据

func (*Queue[T]) Put

func (q *Queue[T]) Put(value T)

Put 将数据放入队列尾部

func (*Queue[T]) Size

func (q *Queue[T]) Size() int

Size 队列大小

type QueueInterface

type QueueInterface[T any] interface {
	Put(value T)
	Pop() (T, bool)
	Size() int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL