{"comment":{"url":"https://api.github.com/repos/scottschurr/rippled/comments/20966863","html_url":"https://github.com/scottschurr/rippled/commit/fb544bd50bb1f1dcd6b36c2da9ba2b9e0c532b43#commitcomment-20966863","id":20966863,"user":{"login":"scottschurr","id":7840379,"avatar_url":"https://avatars.githubusercontent.com/u/7840379?v=3","gravatar_id":"","url":"https://api.github.com/users/scottschurr","html_url":"https://github.com/scottschurr","followers_url":"https://api.github.com/users/scottschurr/followers","following_url":"https://api.github.com/users/scottschurr/following{/other_user}","gists_url":"https://api.github.com/users/scottschurr/gists{/gist_id}","starred_url":"https://api.github.com/users/scottschurr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottschurr/subscriptions","organizations_url":"https://api.github.com/users/scottschurr/orgs","repos_url":"https://api.github.com/users/scottschurr/repos","events_url":"https://api.github.com/users/scottschurr/events{/privacy}","received_events_url":"https://api.github.com/users/scottschurr/received_events","type":"User","site_admin":false},"position":43,"line":202,"path":"src/ripple/core/impl/Stoppable.cpp","commit_id":"fb544bd50bb1f1dcd6b36c2da9ba2b9e0c532b43","created_at":"2017-02-21T00:40:59Z","updated_at":"2017-02-21T00:40:59Z","body":"http://en.cppreference.com/w/cpp/thread/condition_variable paragraph 3 says \r\n\r\n> Even if the shared variable is atomic, it must be modified under the mutex in order to correctly publish the modification to the waiting thread.\r\n\r\nI took them at their word.  However I looked through the standard to see if it said the same thing.  It didn't.\r\n\r\nThis stack overflow answer suggests that using the lock closes a small window if the condition changes during a spurious wakeup: http://stackoverflow.com/questions/36126286/using-stdcondition-variable-with-atomicbool.  So I'm inclined to keep the lock, but I'll improve the comment."}}
{"actor":{"display_login":"scottschurr"}}