isolation

This module implements the Isolated[T] type for safe construction of isolated subgraphs that can be passed efficiently to different channels and threads.

Types

Isolated[T] = object
  value: T
Isolated data can only be moved, not copied.   Source Edit

Procs

proc `=`[T](dest: var Isolated[T]; src: Isolated[T]) {...}{.error.}
  Source Edit
proc `=sink`[T](dest: var Isolated[T]; src: Isolated[T]) {...}{.inline.}
  Source Edit
proc `=destroy`[T](dest: var Isolated[T]) {...}{.inline.}
  Source Edit

Funcs

func isolate[T](value: sink T): Isolated[T] {...}{.magic: "Isolate".}
Create an isolated subgraph from the expression value. Please read https://github.com/nim-lang/RFCs/issues/244 for more details.   Source Edit