I solved this problem by having my task generator generate functions that start tasks instead of the tasks themselves. My consumer then can decide how many of these task-starting functions to run at a time and thus how many tasks are running at a time.
-evan
-evan