clist

package
v0.0.0-...-3449da6 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentList

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

ConcurrentList represents a synchronized doubly linked list. The zero value for List is an empty list ready to use.

func New

func New() *ConcurrentList

New returns an initialized list.

func (*ConcurrentList) Iter

func (cl *ConcurrentList) Iter() <-chan *list.Element

Iter iterates over the items in the concurrent list

func (*ConcurrentList) Len

func (cl *ConcurrentList) Len() int

Len returns the number of elements of list l. The complexity is O(1).

func (*ConcurrentList) PushBack

func (cl *ConcurrentList) PushBack(v interface{}) *list.Element

PushBack inserts a new element e with value v at the back of list l and returns e.

func (*ConcurrentList) Remove

func (cl *ConcurrentList) Remove(v interface{}) interface{}

Remove removes first occurrence of v from l if v is an element of list l. It returns the element value v.

Jump to

Keyboard shortcuts

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