# std/sharedlist

Theme:

- Manual
- Standard library
- Index
- Compiler docs
- Fusion docs
- devel, stable

Search:
Source Edit
Deprecated

Shared list support.

Unstable API.

# Imports

locks

# Types

    SharedList[A] = object
      lock*: Lock

  generic shared list Source Edit

# Procs

    proc add[A](x: var SharedList[A]; y: A)

  Source Edit

    proc clear[A](t: var SharedList[A])

  Source Edit

    proc deinitSharedList[A](t: var SharedList[A])

  Source Edit

    proc init[A](t: var SharedList[A])

  Source Edit

    proc iterAndMutate[A](x: var SharedList[A]; action: proc (x: A): bool)

  Iterates over the list. If `action` returns true, the current item is removed from the list.
  Warning: It may not preserve the element order after some modifications.
  Source Edit

# Iterators

    iterator items[A](x: var SharedList[A]): A

  Source Edit