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
Typed atomics are great, but the ergonomics are a bit clumsy when they are in structs and need to be initialized to nonzero values. Consider a struct containing a typed atomic:
I agree about the ergonomics, but it would be a shame for the API to return a pointer since it forces an allocation and adds indirection. Might be difficult because they're all noCopy, though.
Typed atomics are great, but the ergonomics are a bit clumsy when they are in structs and need to be initialized to nonzero values. Consider a struct containing a typed atomic:
Initialization is typically done inline, but typed atomics need to be done as a separate step:
If typed atomic constructors were provided, it could be initialized inline as follows:
The text was updated successfully, but these errors were encountered: