{"action":"created","issue":{"url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/1","labels_url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/1/comments","events_url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/1/events","html_url":"https://github.com/francescoc/erlangprogramming/pull/1","id":91357640,"number":1,"title":"Validate frequency being deallocated","user":{"login":"derek121","id":1594587,"avatar_url":"https://avatars.githubusercontent.com/u/1594587?v=3","gravatar_id":"","url":"https://api.github.com/users/derek121","html_url":"https://github.com/derek121","followers_url":"https://api.github.com/users/derek121/followers","following_url":"https://api.github.com/users/derek121/following{/other_user}","gists_url":"https://api.github.com/users/derek121/gists{/gist_id}","starred_url":"https://api.github.com/users/derek121/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derek121/subscriptions","organizations_url":"https://api.github.com/users/derek121/orgs","repos_url":"https://api.github.com/users/derek121/repos","events_url":"https://api.github.com/users/derek121/events{/privacy}","received_events_url":"https://api.github.com/users/derek121/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-26T20:43:10Z","updated_at":"2015-06-29T07:45:10Z","closed_at":"2015-06-29T07:45:10Z","pull_request":{"url":"https://api.github.com/repos/francescoc/erlangprogramming/pulls/1","html_url":"https://github.com/francescoc/erlangprogramming/pull/1","diff_url":"https://github.com/francescoc/erlangprogramming/pull/1.diff","patch_url":"https://github.com/francescoc/erlangprogramming/pull/1.patch"},"body":"Don't add Freq to Free if it wasn't actually in Allocated.\r\nAlternatively, could be stricter and fail rather than silently ignoring.\r\n\r\nI'd submitted [a PR](https://github.com/oreillymedia/erlang_programming/pull/2) to the O'Reilly repo a while back, and was reminded of it by [your tweet today](https://twitter.com/FrancescoC/status/614344211639500800)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/comments/116505662","html_url":"https://github.com/francescoc/erlangprogramming/pull/1#issuecomment-116505662","issue_url":"https://api.github.com/repos/francescoc/erlangprogramming/issues/1","id":116505662,"user":{"login":"francescoc","id":979065,"avatar_url":"https://avatars.githubusercontent.com/u/979065?v=3","gravatar_id":"","url":"https://api.github.com/users/francescoc","html_url":"https://github.com/francescoc","followers_url":"https://api.github.com/users/francescoc/followers","following_url":"https://api.github.com/users/francescoc/following{/other_user}","gists_url":"https://api.github.com/users/francescoc/gists{/gist_id}","starred_url":"https://api.github.com/users/francescoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francescoc/subscriptions","organizations_url":"https://api.github.com/users/francescoc/orgs","repos_url":"https://api.github.com/users/francescoc/repos","events_url":"https://api.github.com/users/francescoc/events{/privacy}","received_events_url":"https://api.github.com/users/francescoc/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T07:45:10Z","updated_at":"2015-06-29T07:45:10Z","body":"We do this only for the Error handling section when a race condition can occur after linking to the client process.If the process terminates, we check if a frequency is associated to this process. If so, it is freed. Race conditions can happen, as the process can free the frequency and then terminate before the server handles the request. \r\n\r\nThe case you suggest is as a result of a corrupt state. We decided not to handle all of these border line cases, as they would have made the example more complicated, loosing focus on what we were trying to explain. "}}