I still have trouble understanding the role of task reference count: suppose a parent task created 3 children task and wait for them to finish, then according to the examples, I should set the reference count of the parent task to 3+1=4. But what if I want to have the parent task discarded as soon as it spawns the children tasks, how should I set its reference counter? I'm thinking 0. Wrong answer?
For more complete information about compiler optimizations, see our Optimization Notice.