dimanche 13 juin 2021

Design pattern when you have multiple tasks with and without dependency on each other

for eg : say you are loading an app

Where you have tasks like login task - which has no dependency then say fetchUserData - which depends on login task then say fetchUserHistory etc - which say depends on above 2 tasks and say there are 10 more such tasks with cross dependencies

i know that I can simple do await async and run multiple independent etc parallely

but is there a generic way which is more neat and easy to add more tasks in future if required.

or is there a generic design pattern which does the same ?

Aucun commentaire:

Enregistrer un commentaire