There is no commentSelect some text and then click Comment, or simply add a comment to this page from below to start a discussion.
DRAFT SharedValueTable Proposal
[Serializable]
interface SharedValueTable {
undefined insert([EnforceRange] unsigned long long key, any value); // value must be serializable
any get([EnforceRange] unsigned long long key);
undefined remove([EnforceRange] unsigned long long key);
};
TODO write more
Keeping track of some use cases, and random thoughts
Thread-shareable objects
WebGPU objects (get needs to be FAST, avoid locks)
By construction, also SharedArrayBuffers and other SharedValueTables
For performance reasons it's probably ideal for `get()`` to cache the object it returns so it can return the same one again (in the case of thread-shareable objects at least)