MCPcopy Create free account
hub / github.com/dustinxie/lockfree / Stack

Interface Stack

stack.go:23–35  ·  view source on GitHub ↗

Stack is a LIFO list

Source from the content-addressed store, hash-verified

21type (
22 // Stack is a LIFO list
23 Stack interface {
24 // length of stack
25 Len() int
26
27 // add an item to the stack
28 Push(interface{})
29
30 // remove an item from the stack
31 Pop() interface{}
32
33 // return (but not remove) the top item on the stack
34 Peek() interface{}
35 }
36)
37
38// NewStack creates a new stack

Callers 9

TestNewStackFunction · 0.95
TestStackFunction · 0.95
TestNewStackFunction · 0.95
BenchmarkLockfreeStackFunction · 0.95
TestStackFunction · 0.95
TestNewStackFunction · 0.95
BenchmarkLockfreeStackFunction · 0.95
TestStackFunction · 0.95
TestStackFunction · 0.95

Implementers 1

stacklist/stack.go

Calls

no outgoing calls

Tested by

no test coverage detected