Skip to content

Commit 71196b6

Browse files
committed
refactor(array): share one immutable ArrayState between Array and AsyncArray
Array and AsyncArray now hold the same `_StateCell`, a single mutable slot containing a frozen `ArrayState` (store path, metadata, runtime config, chunk grid, codec pipeline). Members that are derived from that state without IO are defined once on a shared `_ArrayBase`. `Array` does its own IO through the module-level functions instead of calling through its `AsyncArray`, which is kept only as the handle returned by `async_array`. resize, append and update_attributes are split into pure plan functions and a short IO step that swaps the cell's state, replacing in-place mutation of a frozen dataclass via `object.__setattr__` and of the attributes dict. Assisted-by: ClaudeCode:claude-opus-5-5
1 parent 5b8ff1e commit 71196b6

4 files changed

Lines changed: 1213 additions & 1356 deletions

File tree

0 commit comments

Comments
 (0)