{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/470","labels_url":"https://api.github.com/repos/chrsmith/bwapi/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/bwapi/issues/470/comments","events_url":"https://api.github.com/repos/chrsmith/bwapi/issues/470/events","html_url":"https://github.com/chrsmith/bwapi/issues/470","id":58825420,"number":470,"title":"Support multithreading","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Maintainability","name":"Maintainability","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Priority-None","name":"Priority-None","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/bwapi/labels/Usability","name":"Usability","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-24T23:41:22Z","updated_at":"2015-02-24T23:41:23Z","closed_at":"2015-02-24T23:41:22Z","body":"```\nThis is both a feature request and a bug fix.  BWAPI isn't thread safe which is \nunderstandable but calling getAllUnits() shouldn't cause heap corruption in the \ndestructor of Vectorset....\n\nThe following will fail often:\n\nUnitset set = Broodwar->getAllUnits();\n\nThe following is a fix around it:\n\nPlayerset players = Broodwar->getPlayers();\n\nfor (Playerset::iterator it = players.begin();it != players.end();it++)\n{\n  Player* player = *it;\n  Unitset units = player->getUnits();\n\n  ... whatever you need to do with the units ...\n}\n```\n\n-----\nOriginal issue reported on code.google.com by `pawngam...@gmail.com` on 9 Oct 2012 at 8:28"},"comment":{"url":"https://api.github.com/repos/chrsmith/bwapi/issues/comments/75875538","html_url":"https://github.com/chrsmith/bwapi/issues/470#issuecomment-75875538","issue_url":"https://api.github.com/repos/chrsmith/bwapi/issues/470","id":75875538,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T23:41:22Z","updated_at":"2015-02-24T23:41:22Z","body":"\n\n-----\nOriginal comment by `AHeinerm` on 6 Jan 2013 at 4:44\n* Changed state: **Questionable**"}}