{"action":"created","issue":{"url":"https://api.github.com/repos/grosser/parallel/issues/157","labels_url":"https://api.github.com/repos/grosser/parallel/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/grosser/parallel/issues/157/comments","events_url":"https://api.github.com/repos/grosser/parallel/issues/157/events","html_url":"https://github.com/grosser/parallel/pull/157","id":128691359,"number":157,"title":"add queue interface","user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-26T01:25:17Z","updated_at":"2016-01-30T21:27:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grosser/parallel/pulls/157","html_url":"https://github.com/grosser/parallel/pull/157","diff_url":"https://github.com/grosser/parallel/pull/157.diff","patch_url":"https://github.com/grosser/parallel/pull/157.patch"},"body":"\r\nHi!\r\nI have a parallel queue implementation ready and in use for some years (https://github.com/Try2Code/jobQueue). Your gem offers more flexibility in terms of controlling the jobs and getting results back. So I started to port some of my scripts from jobQueue towards parallel. But large blocks do not seem to fit into the array-like approach of Parallel.map. Here, the queue works better for me.\r\n\r\nMy question is, if the queue-class could be integrated into the parallel gem?\r\n\r\ncheers\r\nralf"},"comment":{"url":"https://api.github.com/repos/grosser/parallel/issues/comments/177307038","html_url":"https://github.com/grosser/parallel/pull/157#issuecomment-177307038","issue_url":"https://api.github.com/repos/grosser/parallel/issues/157","id":177307038,"user":{"login":"grosser","id":11367,"avatar_url":"https://avatars.githubusercontent.com/u/11367?v=3","gravatar_id":"","url":"https://api.github.com/users/grosser","html_url":"https://github.com/grosser","followers_url":"https://api.github.com/users/grosser/followers","following_url":"https://api.github.com/users/grosser/following{/other_user}","gists_url":"https://api.github.com/users/grosser/gists{/gist_id}","starred_url":"https://api.github.com/users/grosser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grosser/subscriptions","organizations_url":"https://api.github.com/users/grosser/orgs","repos_url":"https://api.github.com/users/grosser/repos","events_url":"https://api.github.com/users/grosser/events{/privacy}","received_events_url":"https://api.github.com/users/grosser/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T21:27:26Z","updated_at":"2016-01-30T21:27:26Z","body":"the point of the queue interface is that you can fill it forever and when you are done you add the stop,\r\nif you already know all the values up front, then an array would work equally well ?\r\nthen you can simply put lambdas into an array:\r\n\r\n```Ruby\r\nParallel.map([lambda{ 1 }]){ |x|  x.call }\r\n```"}}