synclist

package
v0.0.0-...-c0fde58 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RwSyncList

type RwSyncList struct {
	// contains filtered or unexported fields
}

RwSyncList is a SyncList implementation

func (*RwSyncList) Front

func (m *RwSyncList) Front() *list.Element

func (*RwSyncList) MoveToFront

func (m *RwSyncList) MoveToFront(e *list.Element)

func (*RwSyncList) PushFront

func (m *RwSyncList) PushFront(item interface{}) *list.Element

func (*RwSyncList) Remove

func (m *RwSyncList) Remove(e *list.Element) interface{}

type SyncList

type SyncList interface {
	// PushFront push value to list front and return list.Element
	PushFront(v interface{}) *list.Element
	// Remove the list.Element
	Remove(e *list.Element) interface{}
	// MoveToFront move the list.Element to list front
	MoveToFront(e *list.Element)
	// Front get the list front
	Front() *list.Element
}

SyncList is thread(routine) safe list

func NewSyncList

func NewSyncList() SyncList

NewSyncList constructor for SyncList

Jump to

Keyboard shortcuts

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