Key
Stores a strand-local value.
Constructor
Key()
Creates a new strand-local key.
Fields
valueGets or sets the value associated with this key in the current strand.
Defaults to
nilwhen the key has not been set in the current strand.Open in playgroundlet key = strand.Key() assert_eq $key.value nil key.value = "parent" assert_eq $key.value "parent" let results = strand.fork do assert_eq $key.value "parent" key.value = "child" key.value assert_eq $results (Tuple(["child"])) assert_eq $key.value "parent"