Can tables be shared?
In overview https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md :
[Spec Changes][spec]
The [limits type][] now has an additional field specifying whether the linear memory or table is shared:
limits ::= {min u32, max u32?, share} share ::= unshared | shared
But in the specification https://webassembly.github.io/threads/core/syntax/types.html#syntax-limits the limits doesn't have shared. Is the overview outdated? Seems that tables cannot be shared?
In this version of the proposal, tables can't be shared, only memories. There is an early-stage extension to additionally add shared tables in a separate repository - https://github.com/WebAssembly/shared-everything-threads
Note though that shared tables would only be able to hold "shared references", which is a new concept also introduced by the separate proposal I've linked above. This is because some historical technical limitations of the web make it hard to share ordinary references cross-thread. I actually wrote an article about this recently (https://queue.acm.org/detail.cfm?id=3746173).
Do you have a particular motivation for wanting shared tables?
Thanks for the quick response. I have read that great article earlier. Just found that the overview has seemingly outdated things.
Oh, I misunderstood, sorry! Yes, the current overview in this repository doesn't accurately document in that section that we're only allowing memories to be shared. I'll add a quick note to that section of the overview on this.