{"action":"created","issue":{"url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/27","repository_url":"https://api.github.com/repos/Captain-Chaos/WorldPainter","labels_url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/27/comments","events_url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/27/events","html_url":"https://github.com/Captain-Chaos/WorldPainter/pull/27","id":175219367,"number":27,"title":"Create a task system (Fixes #26)","user":{"login":"frogocomics","id":10662167,"avatar_url":"https://avatars.githubusercontent.com/u/10662167?v=3","gravatar_id":"","url":"https://api.github.com/users/frogocomics","html_url":"https://github.com/frogocomics","followers_url":"https://api.github.com/users/frogocomics/followers","following_url":"https://api.github.com/users/frogocomics/following{/other_user}","gists_url":"https://api.github.com/users/frogocomics/gists{/gist_id}","starred_url":"https://api.github.com/users/frogocomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogocomics/subscriptions","organizations_url":"https://api.github.com/users/frogocomics/orgs","repos_url":"https://api.github.com/users/frogocomics/repos","events_url":"https://api.github.com/users/frogocomics/events{/privacy}","received_events_url":"https://api.github.com/users/frogocomics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2016-09-06T11:02:50Z","updated_at":"2016-09-18T16:35:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/pulls/27","html_url":"https://github.com/Captain-Chaos/WorldPainter/pull/27","diff_url":"https://github.com/Captain-Chaos/WorldPainter/pull/27.diff","patch_url":"https://github.com/Captain-Chaos/WorldPainter/pull/27.patch"},"body":"My proposal for WorldPainter is to implement a task system, where a tasks are created, and run one after the other. I believe WorldPainter should have this because of this important reason:\r\n\r\n- Terraformers constantly have to deal with large maps (10000+ x 10000+), and therefore operations such as global operations because increasingly slow. The task system can make it so that the user (terraformer) can specify as many global operations as they want while their first operation is being processed. Then the task manager executes the tasks one by one in order. This could be a massive time saver for terraformers as they could specify multiple global operations (or other operations), and all of the specified operations will be executed one after the other.\r\n\r\nI've created a task system where task types and the names of the tasks can be specified for preview on the WorldEdit gui. This task system should be fully functional, and should be integrated into some core WorldPainter classes. There are two types of tasks, `UserTask` and `BackgroundTask`. User tasks run ONE after the OTHER. Background tasks run all at once.\r\n\r\nBelow is an example on how to create and execute a task.\r\n```\r\npublic void example() throws InterruptedException {\r\n        //Lets create a task\r\n        UserTask task = new UserTask(new Thread(() -> {\r\n            //Task logic here\r\n        }), \"Example Task\", TaskTypes.CUSTOM);\r\n        task.addToQueue();\r\n        TaskManager.runAll();\r\n    }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/comments/247858087","html_url":"https://github.com/Captain-Chaos/WorldPainter/pull/27#issuecomment-247858087","issue_url":"https://api.github.com/repos/Captain-Chaos/WorldPainter/issues/27","id":247858087,"user":{"login":"frogocomics","id":10662167,"avatar_url":"https://avatars.githubusercontent.com/u/10662167?v=3","gravatar_id":"","url":"https://api.github.com/users/frogocomics","html_url":"https://github.com/frogocomics","followers_url":"https://api.github.com/users/frogocomics/followers","following_url":"https://api.github.com/users/frogocomics/following{/other_user}","gists_url":"https://api.github.com/users/frogocomics/gists{/gist_id}","starred_url":"https://api.github.com/users/frogocomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frogocomics/subscriptions","organizations_url":"https://api.github.com/users/frogocomics/orgs","repos_url":"https://api.github.com/users/frogocomics/repos","events_url":"https://api.github.com/users/frogocomics/events{/privacy}","received_events_url":"https://api.github.com/users/frogocomics/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T16:35:10Z","updated_at":"2016-09-18T16:35:10Z","body":"I don't know to be honest. I think this should be kept in WorldPainter,\njust in case, and could be removed anytime.\n\nOn Sun, Sep 18, 2016 at 8:30 AM, Captain-Chaos <notifications@github.com>\nwrote:\n\n> Haven't heard from you in a while. Are you still interested in pursuing\n> this, or shall I close the pull request?\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Captain-Chaos/WorldPainter/pull/27#issuecomment-247854350>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AKKxF1s58jjpOLqioCCuJ1QmTAFAjOsYks5qrVkxgaJpZM4J1t4L>\n> .\n>\n"}}
{"actor":{"display_login":"frogocomics"}}