{"action":"created","issue":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/1320","labels_url":"https://api.github.com/repos/gulpjs/gulp/issues/1320/labels{/name}","comments_url":"https://api.github.com/repos/gulpjs/gulp/issues/1320/comments","events_url":"https://api.github.com/repos/gulpjs/gulp/issues/1320/events","html_url":"https://github.com/gulpjs/gulp/issues/1320","id":110700776,"number":1320,"title":"async vs sync tasks documentation is confusing","user":{"login":"ghostsquad","id":903488,"avatar_url":"https://avatars.githubusercontent.com/u/903488?v=3","gravatar_id":"","url":"https://api.github.com/users/ghostsquad","html_url":"https://github.com/ghostsquad","followers_url":"https://api.github.com/users/ghostsquad/followers","following_url":"https://api.github.com/users/ghostsquad/following{/other_user}","gists_url":"https://api.github.com/users/ghostsquad/gists{/gist_id}","starred_url":"https://api.github.com/users/ghostsquad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghostsquad/subscriptions","organizations_url":"https://api.github.com/users/ghostsquad/orgs","repos_url":"https://api.github.com/users/ghostsquad/repos","events_url":"https://api.github.com/users/ghostsquad/events{/privacy}","received_events_url":"https://api.github.com/users/ghostsquad/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-09T17:13:45Z","updated_at":"2015-10-09T17:47:08Z","closed_at":"2015-10-09T17:47:08Z","body":"Async vs sync tasks is very confusing in documentation. \r\n\r\nfirst, it says:\r\n> Async task support\r\n> Tasks can be made asynchronous if its fn does one of the following: accepts callback, returns a stream, or returns a promise\r\n\r\nThen is goes on to say:\r\n> Note: By default, tasks run with maximum concurrency -- e.g. it launches all the tasks at once and waits for nothing. If you want to create a series where tasks run in a particular order, you need to do two things:\r\n> \r\n> give it a hint to tell it when the task is done,\r\n> and give it a hint that a task depends on completion of another.\r\n\r\nAsync support is default *IF* requirements are met? That's not really \"default\" if you have to meet some requirements.\r\n\r\nThen, to run synchronously, you need to make the task \"accept a callback hint\", wait, isn't that how you make it Async?\r\n\r\n```\r\n// takes in a callback so the engine knows when it'll be done\r\ngulp.task('one', function(cb) {\r\n    // do stuff -- async or otherwise\r\n    cb(err); // if err is not null and not undefined, the run will stop, and note that it failed\r\n});\r\n```\r\n\r\nWow, I'm confused...."},"comment":{"url":"https://api.github.com/repos/gulpjs/gulp/issues/comments/146944940","html_url":"https://github.com/gulpjs/gulp/issues/1320#issuecomment-146944940","issue_url":"https://api.github.com/repos/gulpjs/gulp/issues/1320","id":146944940,"user":{"login":"phated","id":992373,"avatar_url":"https://avatars.githubusercontent.com/u/992373?v=3","gravatar_id":"","url":"https://api.github.com/users/phated","html_url":"https://github.com/phated","followers_url":"https://api.github.com/users/phated/followers","following_url":"https://api.github.com/users/phated/following{/other_user}","gists_url":"https://api.github.com/users/phated/gists{/gist_id}","starred_url":"https://api.github.com/users/phated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phated/subscriptions","organizations_url":"https://api.github.com/users/phated/orgs","repos_url":"https://api.github.com/users/phated/repos","events_url":"https://api.github.com/users/phated/events{/privacy}","received_events_url":"https://api.github.com/users/phated/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T17:47:08Z","updated_at":"2015-10-09T17:47:08Z","body":"If you would like to make changes to the documentation, please submit a PR."}}