wingo ,
@wingo@mastodon.social avatar

tfw you see a memory_order_relaxed atomic load, prefaced by a comment saying "technically we should use memory_order_consume here" ➡️ 🐉🐉🐉🐉🐉 ⬅️

pkhuong ,

@wingo tfw you see "memory_order_consume" ;)

pervognsen ,
@pervognsen@mastodon.social avatar

@pkhuong @wingo This but with memory_order_consume.

pervognsen ,
@pervognsen@mastodon.social avatar

@pkhuong @wingo (Paul can correct me but I'm pretty sure even the main experts who designed the C++ memory model now consider memory_order_consume to have been a mistake.)

moonchild ,

@pervognsen @pkhuong @wingo mo_consume was a mistake but data dependencies are good and there was a proposal for how to do it right for c++ which is still in limbo....

wingo OP ,
@wingo@mastodon.social avatar

@moonchild @pkhuong @pervognsen i have a general theory that people that conclude they can use a memory order that is not acq/rel or seq_cst are smarter than me but more foolish

pervognsen , (edited )
@pervognsen@mastodon.social avatar

@wingo @moonchild @pkhuong There are plenty of cases with mo_relaxed which are easy to think about but in the general case it's definitely nebulous. I assume you've seen all the out-of-thin-air (OOTA) stuff with mo_relaxed... Apparently mo_relaxed, as it stands, didn't formalize what the designers thought it formalized. It's kind of like the Peano axioms and the standard model of natural numbers vs non-standard models.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • tech
  • kbinEarth
  • testing
  • interstellar
  • wanderlust
  • All magazines