{"action":"created","issue":{"url":"https://api.github.com/repos/SFML/SFML/issues/1007","labels_url":"https://api.github.com/repos/SFML/SFML/issues/1007/labels{/name}","comments_url":"https://api.github.com/repos/SFML/SFML/issues/1007/comments","events_url":"https://api.github.com/repos/SFML/SFML/issues/1007/events","html_url":"https://github.com/SFML/SFML/pull/1007","id":117816428,"number":1007,"title":"Windows: Removed thread affinity changes in sf::Clock","user":{"login":"MarioLiebisch","id":1854245,"avatar_url":"https://avatars.githubusercontent.com/u/1854245?v=3","gravatar_id":"","url":"https://api.github.com/users/MarioLiebisch","html_url":"https://github.com/MarioLiebisch","followers_url":"https://api.github.com/users/MarioLiebisch/followers","following_url":"https://api.github.com/users/MarioLiebisch/following{/other_user}","gists_url":"https://api.github.com/users/MarioLiebisch/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioLiebisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioLiebisch/subscriptions","organizations_url":"https://api.github.com/users/MarioLiebisch/orgs","repos_url":"https://api.github.com/users/MarioLiebisch/repos","events_url":"https://api.github.com/users/MarioLiebisch/events{/privacy}","received_events_url":"https://api.github.com/users/MarioLiebisch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SFML/SFML/labels/bug","name":"bug","color":"ff4242"},{"url":"https://api.github.com/repos/SFML/SFML/labels/m:sfml-system","name":"m:sfml-system","color":"cccccc"},{"url":"https://api.github.com/repos/SFML/SFML/labels/p:windows","name":"p:windows","color":"888888"},{"url":"https://api.github.com/repos/SFML/SFML/labels/s:undecided","name":"s:undecided","color":"ffe20a"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-11-19T13:46:00Z","updated_at":"2016-01-28T06:45:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SFML/SFML/pulls/1007","html_url":"https://github.com/SFML/SFML/pull/1007","diff_url":"https://github.com/SFML/SFML/pull/1007.diff","patch_url":"https://github.com/SFML/SFML/pull/1007.patch"},"body":"This should prevent timing issues on Windows XP and earlier with multi-core CPUs and broken BIOS while avoiding unnecessary threading changes for all other versions of Windows.\r\n\r\nThe whole thing has been [discussed in this thread](http://en.sfml-dev.org/forums/index.php?topic=19375) and in a few other occasions as well I think.\r\n\r\n**TL;DR:** This change prevents consecutive clock/timer queries to return time stamps going back in time, while removing unnecessary changes to the current thread, which possibly weren't even applied properly (see discussion) and also could be non-effective, e.g. in case the whole process isn't assigned to the first core.\r\n\r\nOnly open question for me: What do you think? Would this need a mutex/lock for thread safety? Or would that be overkill?"},"comment":{"url":"https://api.github.com/repos/SFML/SFML/issues/comments/176014081","html_url":"https://github.com/SFML/SFML/pull/1007#issuecomment-176014081","issue_url":"https://api.github.com/repos/SFML/SFML/issues/1007","id":176014081,"user":{"login":"TankOs","id":111807,"avatar_url":"https://avatars.githubusercontent.com/u/111807?v=3","gravatar_id":"","url":"https://api.github.com/users/TankOs","html_url":"https://github.com/TankOs","followers_url":"https://api.github.com/users/TankOs/followers","following_url":"https://api.github.com/users/TankOs/following{/other_user}","gists_url":"https://api.github.com/users/TankOs/gists{/gist_id}","starred_url":"https://api.github.com/users/TankOs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TankOs/subscriptions","organizations_url":"https://api.github.com/users/TankOs/orgs","repos_url":"https://api.github.com/users/TankOs/repos","events_url":"https://api.github.com/users/TankOs/events{/privacy}","received_events_url":"https://api.github.com/users/TankOs/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T06:45:09Z","updated_at":"2016-01-28T06:45:09Z","body":"@JonnyPtn Great that you are able to workaround the issue.\r\n\r\nGiven that XP is really old, and that adding a critical section wouldn't benefit any other platform, I think the most SFML should do is documenting it.\r\n\r\nWhat do others think?"}}