diff options
Diffstat (limited to 'lib/std')
-rw-r--r-- | lib/std/isolation.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/isolation.nim b/lib/std/isolation.nim index 7c44f47fb..70395d6d4 100644 --- a/lib/std/isolation.nim +++ b/lib/std/isolation.nim @@ -30,3 +30,11 @@ func isolate*[T](value: sink T): Isolated[T] {.magic: "Isolate".} = ## Please read https://github.com/nim-lang/RFCs/issues/244 ## for more details. Isolated[T](value: value) + +func unsafeIsolate*[T](value: sink T): Isolated[T] = + ## Creates an isolated subgraph from the expression `value`. + Isolated[T](value: value) + +func extract*[T](src: var Isolated[T]): T = + ## Returns the internal value of `src`. + result = move(src.value) |