Task distribution

Does anyone know how the task distribution system works? I’m a bit new at DA but I’ve noticed sometimes I start a project with say 50 tasks, I do 5 before bed and by the next day I still have the other 45 tasks. Other times, if start a project with say 50 tasks (using the same example) I do 5 before bed and by the next day there’s 20 tasks left or sometimes none. The other day I had 40 tasks on a project, took a one hour break to have lunch and had nothing available when I got back. I don’t understand the pattern. When do my tasks get given to another worker? What can I do to maintain my projects/tasks?