Expand description
Heap object layouts and their GC hooks.
Every object starts with a Header. Instances keep their fields inline as atomic words, so a
racing reader can never see a torn value. Lists do the same with their elements and swap whole
buffers on growth, so their reads never lock. Dicts and other containers keep Rust-side
buffers; the ownership rules (and per-object locks for shared objects) guarantee those are
never mutated while another thread reads them.
Structs§
- Atomic
Obj - BigInt
Obj - CellObj
- Channel
Inner - Channel
Obj - Channel
State - Closure
Obj - DictObj
- Instance
Obj - ListBuf
- A list’s backing array: a capacity word followed by
capslots. Slots at or past the list’s length always holdnil, so a racing reader that sees a stale length never sees a stale pointer. - ListObj
- A list: header, length and a pointer to a backing array.
- Mutex
Obj - Native
Obj - StrObj
- String
Builder Obj - Thread
Inner - Thread
Obj - Tuple
Obj
Enums§
- Thread
Outcome - Outcome of a finished thread: its value or its panic message.
Traits§
Functions§
- as_
atomic ⚠ - Safety
- as_
bigint ⚠ - Safety
- as_cell⚠
- Safety
- as_
channel ⚠ - Safety
- as_
closure ⚠ - Safety
- as_dict⚠
- Safety
- as_
instance ⚠ - Safety
- as_list⚠
- Safety
- as_
mutex ⚠ - Safety
- as_
native ⚠ - Safety
- as_sb⚠
- Safety
- as_
str_ ⚠obj - Safety
- as_
thread ⚠ - Safety
- as_
tuple ⚠ - Safety
- kind_of
- The object kind of a value (
Immediatefor non-pointers). - mark_
value - str_of
- Returns the string slice if
vis a string.