Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Are lock() and sf::Lock guaranteed to be atomic on all platforms?  (Read 896 times)

0 Members and 1 Guest are viewing this topic.

Guni

  • Newbie
  • *
  • Posts: 20
    • View Profile
I am pretty sure this is the case (why else would SFML offer threading if locking was not reliable), but I just wanted some confirmation since there is no guarantee that these operations are atomic in the documentation. I'm looking at Windows, OS X, and Linux.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32451
    • View Profile
    • SFML's website
    • Email
Re: Are lock() and sf::Lock guaranteed to be atomic on all platforms?
« Reply #1 on: April 08, 2012, 08:35:39 am »
I don't know if they are atomic (there are other strategies than atomicity to make this kind of functions work), but SFML doesn't add anything on top of the OS functions, so they are safe.
Laurent Gomila - SFML developer

 

anything