{"action":"closed","issue":{"url":"https://api.github.com/repos/coala-analyzer/coala/issues/724","labels_url":"https://api.github.com/repos/coala-analyzer/coala/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/coala-analyzer/coala/issues/724/comments","events_url":"https://api.github.com/repos/coala-analyzer/coala/issues/724/events","html_url":"https://github.com/coala-analyzer/coala/issues/724","id":92606150,"number":724,"title":"add coala pool","user":{"login":"sils1297","id":5716520,"avatar_url":"https://avatars.githubusercontent.com/u/5716520?v=3","gravatar_id":"","url":"https://api.github.com/users/sils1297","html_url":"https://github.com/sils1297","followers_url":"https://api.github.com/users/sils1297/followers","following_url":"https://api.github.com/users/sils1297/following{/other_user}","gists_url":"https://api.github.com/users/sils1297/gists{/gist_id}","starred_url":"https://api.github.com/users/sils1297/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sils1297/subscriptions","organizations_url":"https://api.github.com/users/sils1297/orgs","repos_url":"https://api.github.com/users/sils1297/repos","events_url":"https://api.github.com/users/sils1297/events{/privacy}","received_events_url":"https://api.github.com/users/sils1297/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coala-analyzer/coala/labels/feature","name":"feature","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/coala-analyzer/coala/milestones/3","html_url":"https://github.com/coala-analyzer/coala/milestones/0.3%20alpha","labels_url":"https://api.github.com/repos/coala-analyzer/coala/milestones/3/labels","id":1012484,"number":3,"title":"0.3 alpha","description":" * Code clone detection\r\n * textual language independent code analysis\r\n * HTML interactor\r\n * GUI","creator":{"login":"sils1297","id":5716520,"avatar_url":"https://avatars.githubusercontent.com/u/5716520?v=3","gravatar_id":"","url":"https://api.github.com/users/sils1297","html_url":"https://github.com/sils1297","followers_url":"https://api.github.com/users/sils1297/followers","following_url":"https://api.github.com/users/sils1297/following{/other_user}","gists_url":"https://api.github.com/users/sils1297/gists{/gist_id}","starred_url":"https://api.github.com/users/sils1297/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sils1297/subscriptions","organizations_url":"https://api.github.com/users/sils1297/orgs","repos_url":"https://api.github.com/users/sils1297/repos","events_url":"https://api.github.com/users/sils1297/events{/privacy}","received_events_url":"https://api.github.com/users/sils1297/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":13,"state":"open","created_at":"2015-03-09T14:36:10Z","updated_at":"2015-08-17T16:58:41Z","due_on":"2015-08-21T22:00:00Z","closed_at":null},"comments":5,"created_at":"2015-07-02T10:37:23Z","updated_at":"2015-08-17T16:58:41Z","closed_at":"2015-08-17T16:58:41Z","body":"So it would be awesome to be able to do dataparallel programming managed by coala. I imagine something like\r\n\r\n```python\r\nfrom coalib.bears.bear import bear\r\nfrom coalib.bearlib.pool import coala_pool\r\n\r\n@bear(BEAR_KIND.LOCAL, depends_on=[another])\r\ndef find_keyword(filename, file, keyword: str, pool: coala_pool):\r\n    for line_nr, has_kw in pool.imap(lambda: line_nr, line: line_nr, keyword in line, file):\r\n        yield Result(...)\r\n```\r\n\r\nSo the bear just demands a pool argument and will get a pool object that already knows how to contact the coala main process and scheduling jobs. If invoked without a pool object, the bear decorator can simply create a multiprocessing.pool object.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/23522576-add-coala-pool?utm_campaign=plugin&utm_content=tracker%2F2228228&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2228228&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}