{"comment":{"url":"https://api.github.com/repos/zohl/servant-auth-cookie/comments/18315776","html_url":"https://github.com/zohl/servant-auth-cookie/commit/aba61c8ef7f3b54f987bc2df5282e071204402c0#commitcomment-18315776","id":18315776,"user":{"login":"mrkkrp","id":8165792,"avatar_url":"https://avatars.githubusercontent.com/u/8165792?v=3","gravatar_id":"","url":"https://api.github.com/users/mrkkrp","html_url":"https://github.com/mrkkrp","followers_url":"https://api.github.com/users/mrkkrp/followers","following_url":"https://api.github.com/users/mrkkrp/following{/other_user}","gists_url":"https://api.github.com/users/mrkkrp/gists{/gist_id}","starred_url":"https://api.github.com/users/mrkkrp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrkkrp/subscriptions","organizations_url":"https://api.github.com/users/mrkkrp/orgs","repos_url":"https://api.github.com/users/mrkkrp/repos","events_url":"https://api.github.com/users/mrkkrp/events{/privacy}","received_events_url":"https://api.github.com/users/mrkkrp/received_events","type":"User","site_admin":false},"position":127,"line":127,"path":"src/Servant/Server/Experimental/Auth/Cookie/Internal.hs","commit_id":"aba61c8ef7f3b54f987bc2df5282e071204402c0","created_at":"2016-07-20T11:00:38Z","updated_at":"2016-07-20T11:00:38Z","body":"Here it's possble that the state will be updated twice because several threads can read current state simultaneously, evaluate it as expired, then decide to update it. I'm still not sure what do you think `refreshRef` does, but it won't help anything whatsoever. You will get two atomic writes which are sure sequential in ordering, but nothing prevents this code to be initiated twice. This is not that ciritical as in case with `getRandomBytes` but anyway there is a better approach. `atomicModifyIORef`' can help here."}}
{"actor":{"display_login":"mrkkrp"}}