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
array length 64 - (unsafe.Sizeof(slotOf[I]{}) % 64) (value of type uintptr) must be constant
The padding is required to both align atomic ops on the turn field (I need to deal with an array of slotOfPadded structs) and to prevent false sharing.
The language doesn't seem to support this use case, but maybe there are any workarounds I'm not aware of. If there are none, it would be great to support adding padding on a generic struct.
The text was updated successfully, but these errors were encountered:
I'm trying to add padding on a generic struct (the full code is here):
and getting a compiler error as a result:
The padding is required to both align atomic ops on the
turn
field (I need to deal with an array ofslotOfPadded
structs) and to prevent false sharing.The language doesn't seem to support this use case, but maybe there are any workarounds I'm not aware of. If there are none, it would be great to support adding padding on a generic struct.
The text was updated successfully, but these errors were encountered: