# Struct crossbeam::sync::TreiberStack [−] [src]

    pub struct TreiberStack<T> { /* fields omitted */ }

Treiber's lock-free stack.

Usable with any number of producers and consumers.

## Methods

### `impl<T> TreiberStack<T>`
[src]

#### `pub fn new() -> TreiberStack<T>`
[src]

Create a new, empty stack.

#### `pub fn push(&self, t: T)`
[src]

Push `t` on top of the stack.

#### `pub fn pop(&self) -> Option<T>`
[src]

Attempt to pop the top element of the stack. Deprecated method, use try_pop

Returns `None` if the stack is observed to be empty.

#### `pub fn try_pop(&self) -> Option<T>`
[src]

Attempt to pop the top element of the stack.

Returns `None` if the stack is observed to be empty.

#### `pub fn is_empty(&self) -> bool`
[src]

Check if this queue is empty.

## Trait Implementations

### `impl<T: Debug> Debug for TreiberStack<T>`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

### `impl<T> Drop for TreiberStack<T>`
[src]

#### `fn drop(&mut self)`
[src]

Executes the destructor for this type. Read more

### `impl<T> Default for TreiberStack<T>`
[src]

#### `fn default() -> Self`
[src]

Returns the "default value" for a type. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)