summaryrefslogtreecommitdiff
path: root/docs/type_system/shared.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-10 13:34:38 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-10 13:34:38 -0400
commit51d055dc7e1a6edbaedb7ea80b1e678eff924fe0 (patch)
tree03643ee752fb6df836d662df1ce099d547d708dd /docs/type_system/shared.md
parentaebce1e48e81559ffe5f496af855a1140d8e0107 (diff)
specify type representation
Diffstat (limited to 'docs/type_system/shared.md')
-rw-r--r--docs/type_system/shared.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/type_system/shared.md b/docs/type_system/shared.md
new file mode 100644
index 0000000..db8e6dc
--- /dev/null
+++ b/docs/type_system/shared.md
@@ -0,0 +1,27 @@
+# Shared
+
+---
+
+Hold multiple references to the same object
+
+```text
+Shared[[LOCK] Type]
+```
+
+### `LOCK`
+
+The shared type has been detected across asynchronous tasks and needs to lock the mutex on mutation
+
+# Garbage Collection
+
+A tracing mark and sweep garbage collector is used
+
+# Mutating
+
+```text
+x : Shared[Array] $ (1; 2; 3)
+^ x {[y]
+ y `push 4
+}
+`log x // Shared[Array[I64]] $ (1; 2; 3; 4)
+```