You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AtomTable, which stores elements as AtomHeaders followed by strs (these are grouped together as AtomData)
Stack, which stores elements as either AndFrame or OrFrame, followed by [HeapCellValue] (they are not grouped together in a single type, instead relying on the rather fragile property that AndFrame are only ever stored within a RawBlock)
F64Table, which I believe could be implemented without RawBlock, as it only really needs an atomic for the length.
Stack is pretty wildly unsafe, while AtomTablecan be tweaked to become safe.
I believe that the logic in AtomTable for properly handling buffers that store variable-length data as a header-slice pair could be extracted into a proper abstraction on top of (or instead of) RawBlock, and then used to make Stack safe and AtomTable easier to maintain.
Care needs to be taken to still allow AtomTable to be Sync using the new API: reads and appends must work together nicely across threads.
There might be crates for this already, although I don't know if they provide the above guarantees for thread safety.
The text was updated successfully, but these errors were encountered:
RawBlock
is currently used in three places:AtomTable
, which stores elements asAtomHeader
s followed bystr
s (these are grouped together asAtomData
)Stack
, which stores elements as eitherAndFrame
orOrFrame
, followed by[HeapCellValue]
(they are not grouped together in a single type, instead relying on the rather fragile property thatAndFrame
are only ever stored within aRawBlock
)F64Table
, which I believe could be implemented withoutRawBlock
, as it only really needs an atomic for the length.Stack
is pretty wildly unsafe, whileAtomTable
can be tweaked to become safe.I believe that the logic in
AtomTable
for properly handling buffers that store variable-length data as a header-slice pair could be extracted into a proper abstraction on top of (or instead of)RawBlock
, and then used to makeStack
safe andAtomTable
easier to maintain.Care needs to be taken to still allow
AtomTable
to beSync
using the new API: reads and appends must work together nicely across threads.There might be crates for this already, although I don't know if they provide the above guarantees for thread safety.
The text was updated successfully, but these errors were encountered: