Author Topic: std::kill_dependency  (Read 57250 times)

TA

  • Newbie
  • *
  • Posts: 20
    • View Profile
std::kill_dependency
« on: December 16, 2010, 05:34:13 PM »
Hi Anthony,

It was interesting to me how does std::kill_dependency implemented and I looked at the code of this function..It looks pretty much interesting. Does it really kill the dependency or it is provided just to support standard?

Thanks.
« Last Edit: December 16, 2010, 05:36:23 PM by TA »

Anthony Williams

  • Administrator
  • Full Member
  • *****
  • Posts: 103
    • View Profile
    • just::thread C++ Thread Library
Re: std::kill_dependency
« Reply #1 on: December 17, 2010, 09:32:12 AM »
The dependency ordering stuff only matters where memory_order_consume is distinct from memory_order_acquire. This is not the case for x86 systems, which is the only type of processor currently supported by just::thread. std::kill_dependency is thus a no-op, and is provided for completeness only.

TA

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: std::kill_dependency
« Reply #2 on: December 17, 2010, 09:55:04 AM »
The dependency ordering stuff only matters where memory_order_consume is distinct from memory_order_acquire. This is not the case for x86 systems, which is the only type of processor currently supported by just::thread. std::kill_dependency is thus a no-op, and is provided for completeness only.
Ah OK..I didn't think about that, thanks.