{"action":"created","issue":{"url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/22","repository_url":"https://api.github.com/repos/cameron314/concurrentqueue","labels_url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/22/comments","events_url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/22/events","html_url":"https://github.com/cameron314/concurrentqueue/pull/22","id":95780518,"number":22,"title":"add timeout to dequeue - unix only","user":{"login":"mojoBrendan","id":3146111,"avatar_url":"https://avatars.githubusercontent.com/u/3146111?v=3","gravatar_id":"","url":"https://api.github.com/users/mojoBrendan","html_url":"https://github.com/mojoBrendan","followers_url":"https://api.github.com/users/mojoBrendan/followers","following_url":"https://api.github.com/users/mojoBrendan/following{/other_user}","gists_url":"https://api.github.com/users/mojoBrendan/gists{/gist_id}","starred_url":"https://api.github.com/users/mojoBrendan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojoBrendan/subscriptions","organizations_url":"https://api.github.com/users/mojoBrendan/orgs","repos_url":"https://api.github.com/users/mojoBrendan/repos","events_url":"https://api.github.com/users/mojoBrendan/events{/privacy}","received_events_url":"https://api.github.com/users/mojoBrendan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-18T02:38:31Z","updated_at":"2016-05-04T13:58:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cameron314/concurrentqueue/pulls/22","html_url":"https://github.com/cameron314/concurrentqueue/pull/22","diff_url":"https://github.com/cameron314/concurrentqueue/pull/22.diff","patch_url":"https://github.com/cameron314/concurrentqueue/pull/22.patch"},"body":"Only tested on Linux, this won't build for anything else until the semaphore implementations are updated.\r\n\r\nThe idea is to specify a maximum time to wait for a new item, returning early is ok.\r\n\r\nYou could also look at adding a c++11 based semaphore implementation, like http://stackoverflow.com/a/27852868 which would support the timeout operations.\r\n\r\nThis implementation is just using microseconds, but std::chrono could be an alternative too"},"comment":{"url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/comments/216873365","html_url":"https://github.com/cameron314/concurrentqueue/pull/22#issuecomment-216873365","issue_url":"https://api.github.com/repos/cameron314/concurrentqueue/issues/22","id":216873365,"user":{"login":"cameron314","id":116235,"avatar_url":"https://avatars.githubusercontent.com/u/116235?v=3","gravatar_id":"","url":"https://api.github.com/users/cameron314","html_url":"https://github.com/cameron314","followers_url":"https://api.github.com/users/cameron314/followers","following_url":"https://api.github.com/users/cameron314/following{/other_user}","gists_url":"https://api.github.com/users/cameron314/gists{/gist_id}","starred_url":"https://api.github.com/users/cameron314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cameron314/subscriptions","organizations_url":"https://api.github.com/users/cameron314/orgs","repos_url":"https://api.github.com/users/cameron314/repos","events_url":"https://api.github.com/users/cameron314/events{/privacy}","received_events_url":"https://api.github.com/users/cameron314/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T13:58:17Z","updated_at":"2016-05-04T13:58:17Z","body":"Cool, thanks. I'll add the header. I haven't written any tests yet, but I'm fairly confident in the logic."}}