{"action":"created","issue":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1693","repository_url":"https://api.github.com/repos/redux-saga/redux-saga","labels_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1693/labels{/name}","comments_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1693/comments","events_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1693/events","html_url":"https://github.com/redux-saga/redux-saga/issues/1693","id":385594082,"node_id":"MDU6SXNzdWUzODU1OTQwODI=","number":1693,"title":"How can I wait all 'put' actions finished in running parallel?","user":{"login":"tomzaku","id":19413272,"node_id":"MDQ6VXNlcjE5NDEzMjcy","avatar_url":"https://avatars1.githubusercontent.com/u/19413272?v=4","gravatar_id":"","url":"https://api.github.com/users/tomzaku","html_url":"https://github.com/tomzaku","followers_url":"https://api.github.com/users/tomzaku/followers","following_url":"https://api.github.com/users/tomzaku/following{/other_user}","gists_url":"https://api.github.com/users/tomzaku/gists{/gist_id}","starred_url":"https://api.github.com/users/tomzaku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomzaku/subscriptions","organizations_url":"https://api.github.com/users/tomzaku/orgs","repos_url":"https://api.github.com/users/tomzaku/repos","events_url":"https://api.github.com/users/tomzaku/events{/privacy}","received_events_url":"https://api.github.com/users/tomzaku/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-29T06:52:31Z","updated_at":"2018-11-29T09:09:08Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n```\r\nconst data = yield all([\r\n        // @TODO: Should be use action function.\r\n        yield put({\r\n            type: '@@app/PCPNAME/QUERY',\r\n            payload: {},\r\n        }),\r\n        yield put({\r\n            type: '@@app/PCPREGIONNAME/QUERY',\r\n            payload: {},\r\n        }),\r\n        yield put({\r\n            type: '@@app/PCPGROUPNAME/QUERY',\r\n            payload: {},\r\n        }),\r\n        yield put({\r\n            type: '@@app/SERVICETYPE/QUERY',\r\n            payload: {},\r\n        }),\r\n        yield put({\r\n            type: '@@app/PCPPRIMARYSPECIALTY/QUERY',\r\n            payload: {},\r\n        }),\r\n    ])\r\nconsole.log('DATA >>>', data)\r\n```\r\nWhen I run this function, the 'DATA >>>' run before actions such as: '@@app/PCPPRIMARYSPECIALTY/QUERY', '@@app/PCPNAME/QUERY'....\r\n\r\nHow can I wait all the actions finished?"},"comment":{"url":"https://api.github.com/repos/redux-saga/redux-saga/issues/comments/442759069","html_url":"https://github.com/redux-saga/redux-saga/issues/1693#issuecomment-442759069","issue_url":"https://api.github.com/repos/redux-saga/redux-saga/issues/1693","id":442759069,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0Mjc1OTA2OQ==","user":{"login":"GabrielFerrarini","id":14163427,"node_id":"MDQ6VXNlcjE0MTYzNDI3","avatar_url":"https://avatars2.githubusercontent.com/u/14163427?v=4","gravatar_id":"","url":"https://api.github.com/users/GabrielFerrarini","html_url":"https://github.com/GabrielFerrarini","followers_url":"https://api.github.com/users/GabrielFerrarini/followers","following_url":"https://api.github.com/users/GabrielFerrarini/following{/other_user}","gists_url":"https://api.github.com/users/GabrielFerrarini/gists{/gist_id}","starred_url":"https://api.github.com/users/GabrielFerrarini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GabrielFerrarini/subscriptions","organizations_url":"https://api.github.com/users/GabrielFerrarini/orgs","repos_url":"https://api.github.com/users/GabrielFerrarini/repos","events_url":"https://api.github.com/users/GabrielFerrarini/events{/privacy}","received_events_url":"https://api.github.com/users/GabrielFerrarini/received_events","type":"User","site_admin":false},"created_at":"2018-11-29T09:09:08Z","updated_at":"2018-11-29T09:09:08Z","author_association":"NONE","body":"If I understand you correctly, then put doesn't \"execute\" the action. It dispatches it to the redux store and then other sagas will listen and execute the actions independently (depending on how you implemented them). If you want the actual queries/api calls to be executed in parallel and awaited for, you should yield an array of \"call\" effects, like this: https://redux-saga.js.org/docs/advanced/RunningTasksInParallel.html"}}
{"actor":{"display_login":"GabrielFerrarini"}}