never done anything like this, dont even know if this works. for context the column sizes is the size of a concrete type, user is responsible for casting a cell []u8 to a concrete type pointer
ByteTable
rowSize: usize // sum of column_sizes
rows: usize // how many rows exist
capacity: usize // row storage capacity
column_sizes: []usize // order dependant, byte size of whatever the type is
bytes: UList(u8) // every component list smashed into one, order dependant, for cache efficiency
bytes_lock: RwLock // a lock for anything that changes the size of bytes (addRow, remRow)
col_locks: []RwLock // a lock per column
row_locks: []RwLock // a lock per row
Write to a Cell:
if(bytes_lock == lock) wait
if(column == locked and row == locked) wait
else if(column == locked and row == unlocked) lock row, defer row unlock
else if(column == unlocked and row == locked) lock column, defer column unlock
write to cell
init (alloc, column_sizes: []usize) ByteTable
deinit (alloc) void
read (column_index, row_index) []u8
write (alloc, column_index, row_index, cell_data: []u8) void
addRow (alloc) row_index
remRow (alloc, row_index)
Iterator(alloc) ...
Spliterator(alloc) ...