SFML community forums

Help => System => Topic started by: Guni on April 08, 2012, 04:28:47 am

Title: Are lock() and sf::Lock guaranteed to be atomic on all platforms?
Post by: Guni on April 08, 2012, 04:28:47 am
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.
Title: Re: Are lock() and sf::Lock guaranteed to be atomic on all platforms?
Post by: Laurent 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.