diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-10 10:21:32 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-10 10:21:32 -0400 |
| commit | aebce1e48e81559ffe5f496af855a1140d8e0107 (patch) | |
| tree | 4ae6a60e627e26a8cf748fef80de8929ddd2e83e /docs/type_system/gc.md | |
| parent | 2ed2fbbc6f233f8aedf14e5d064451c3dea90d87 (diff) | |
rename shared qualifier to gc
Diffstat (limited to 'docs/type_system/gc.md')
| -rw-r--r-- | docs/type_system/gc.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/docs/type_system/gc.md b/docs/type_system/gc.md new file mode 100644 index 0000000..3fcf88e --- /dev/null +++ b/docs/type_system/gc.md @@ -0,0 +1,35 @@ +# Gc + +--- + +Hold multiple references to the same object + +```text +Gc[Type; GC_FLAGS] +``` + +# Alias + +```text +Shared[Generic.T] `alias Gc[Generic.T; GC_FLAGS] +``` + +## `GC_FLAGS` + +### Lock Mutex + +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) +``` |
