Touch moves the specified item to the last position of the stack
(item *list.Element)
| 44 | |
| 45 | // Touch moves the specified item to the last position of the stack |
| 46 | func (s *Stack) Touch(item *list.Element) { |
| 47 | s.lock.Lock() |
| 48 | if item != s.items.Back() { |
| 49 | s.items.MoveToBack(item) |
| 50 | } |
| 51 | s.lock.Unlock() |
| 52 | } |
| 53 | |
| 54 | // Push adds a new item to the last position of the stack |
| 55 | func (s *Stack) Push(id int) *list.Element { |
no outgoing calls