Closed tlively closed 10 months ago
@rossberg is having a separate instruction for eq
on shared references the right approach? We had some vague "principal types" reasoning for it in the meeting.
I'm actually having some second thoughts about my proposed change to waitqueue
. I'm starting to feel like you would rather have a parameterised waitqueue T
type where T
is some subtype of eq
rather than just waitqueue
with an eqref
inside. In particular with the waitqueue
I floated, the CAS-loop strategy for implementing i31
atomic arithmetic requires a downcast with each loop iteration. Being able to define waitqueue i31
would avoid this.
So the conservative thing might be to stick with waitqueue i32
for now, since I think one might want a parameterised type for waitqueue
with a reference inside.
Shouldn't struct/array.atomic.set be valid for i8 and i16 as well?
ref.shared.eq