{"action":"created","issue":{"url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/44","labels_url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/44/comments","events_url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/44/events","html_url":"https://github.com/benjamin-hodgson/asynqp/issues/44","id":107574027,"number":44,"title":"Refactor QueueReader to use single async task","user":{"login":"TarasLevelUp","id":8791291,"avatar_url":"https://avatars.githubusercontent.com/u/8791291?v=3","gravatar_id":"","url":"https://api.github.com/users/TarasLevelUp","html_url":"https://github.com/TarasLevelUp","followers_url":"https://api.github.com/users/TarasLevelUp/followers","following_url":"https://api.github.com/users/TarasLevelUp/following{/other_user}","gists_url":"https://api.github.com/users/TarasLevelUp/gists{/gist_id}","starred_url":"https://api.github.com/users/TarasLevelUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TarasLevelUp/subscriptions","organizations_url":"https://api.github.com/users/TarasLevelUp/orgs","repos_url":"https://api.github.com/users/TarasLevelUp/repos","events_url":"https://api.github.com/users/TarasLevelUp/events{/privacy}","received_events_url":"https://api.github.com/users/TarasLevelUp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-21T18:47:25Z","updated_at":"2015-09-23T19:13:25Z","closed_at":null,"body":"Currently the queue reader has next method:\r\n```python\r\n    def ready(self):\r\n        assert not self.is_waiting, \"ready() got called while waiting for a frame to be read\"\r\n        self.is_waiting = True\r\n\r\n        t = asyncio.async(self._read_next(), loop=self._loop)\r\n        if _TEST:  # this feels hacky to me\r\n            t._log_destroy_pending = False\r\n```\r\nIf can be rewritten to only contain 1 task, that will always wait for new data and push it to queue. "},"comment":{"url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/comments/142701175","html_url":"https://github.com/benjamin-hodgson/asynqp/issues/44#issuecomment-142701175","issue_url":"https://api.github.com/repos/benjamin-hodgson/asynqp/issues/44","id":142701175,"user":{"login":"TarasLevelUp","id":8791291,"avatar_url":"https://avatars.githubusercontent.com/u/8791291?v=3","gravatar_id":"","url":"https://api.github.com/users/TarasLevelUp","html_url":"https://github.com/TarasLevelUp","followers_url":"https://api.github.com/users/TarasLevelUp/followers","following_url":"https://api.github.com/users/TarasLevelUp/following{/other_user}","gists_url":"https://api.github.com/users/TarasLevelUp/gists{/gist_id}","starred_url":"https://api.github.com/users/TarasLevelUp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TarasLevelUp/subscriptions","organizations_url":"https://api.github.com/users/TarasLevelUp/orgs","repos_url":"https://api.github.com/users/TarasLevelUp/repos","events_url":"https://api.github.com/users/TarasLevelUp/events{/privacy}","received_events_url":"https://api.github.com/users/TarasLevelUp/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T19:13:24Z","updated_at":"2015-09-23T19:13:24Z","body":"@benjamin-hodgson \r\nCracked my header around 1 element in the library: `reader.ready()`. It basically states, that the reader can process 1 next message. Question: \"Why is it necessary to manage this so carefully\", or \"Will something break if we just pass frames to Actor's the next instant as it arrives (and loop is ticked)\"?"}}