1. A method, comprising: performing by a computer: executing a given task in a data-driven computation, wherein said executing comprises spawning two or more other tasks; for each of the spawned tasks: determining whether to schedule the spawned task for execution or defer execution of the spawned task; executing a subset of the spawned tasks, wherein the subset comprises all of the spawned tasks that were scheduled for execution; and subsequent to completing said executing the subset of the spawned tasks, executing another subset of the spawned tasks, wherein the other subset comprises spawned tasks for which execution was deferred.