{"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":7,"created_at":"2015-11-19T13:46:00Z","updated_at":"2016-01-18T10:34:59Z","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/172492842","html_url":"https://github.com/SFML/SFML/pull/1007#issuecomment-172492842","issue_url":"https://api.github.com/repos/SFML/SFML/issues/1007","id":172492842,"user":{"login":"Bromeon","id":708488,"avatar_url":"https://avatars.githubusercontent.com/u/708488?v=3","gravatar_id":"","url":"https://api.github.com/users/Bromeon","html_url":"https://github.com/Bromeon","followers_url":"https://api.github.com/users/Bromeon/followers","following_url":"https://api.github.com/users/Bromeon/following{/other_user}","gists_url":"https://api.github.com/users/Bromeon/gists{/gist_id}","starred_url":"https://api.github.com/users/Bromeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bromeon/subscriptions","organizations_url":"https://api.github.com/users/Bromeon/orgs","repos_url":"https://api.github.com/users/Bromeon/repos","events_url":"https://api.github.com/users/Bromeon/events{/privacy}","received_events_url":"https://api.github.com/users/Bromeon/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T10:34:59Z","updated_at":"2016-01-18T10:34:59Z","body":"> While I could agree with what Bromeon commented above, I'd still vote to completely remove the whole \"bugfix\"\r\n\r\nWhy \"still\"? I was in favor of removing this \"bugfix\" (which doesn't actually fix things, but hide bugs, decrease performance and introduce race conditions -- see above).\r\n\r\nIf it's easy to support the special case for Windows XP by using the current implementation (not this PR), I'm okay with a case differentiation."}}