cylc/cylc — pull request #939 by hjoliver (2014-04-14 11:41:44+00:00)
Title: Iso8601 new runahead implementation

This addresses the problem that with the ISO8601-related changes we can now make suites that have many tasks waiting, potentially for a very long time, for the final cycle(s) of the suite run, until which time they'll just be cluttering the GUI views and unnecessarily impacting dependency matching performance.

So: on this branch all new task proxies (whether loaded at start-up, manually inserted, or spawned) now go initially into a new "runahead task pool" that is not involved in dependency matching or (almost) anything else, and is not visible in the GUI. Each time through the main scheduler loop we release tasks into the main pool as they drop below the runahead limit. The 'runahead' task state has been removed because it is no longer necessary. An option to list or view tasks in the runahead pool may still be needed.

These changes were such that it made sense (IMO) to do #788 at the same time: I've moved all methods that involve iterating over the members of the task pool into the task pool module, so now ```scheduler.py``` is the big picture, and ```task_pool.py``` is pretty much self-contained and will make it much easier to change the task pool model in the future, if necessary (as #788 explains, the pool was once a flat list, and it's gradually getting more complicted). These changes are quite trivial - they should have no effect on the operation of cylc, and they should be easy to distinguish from the aforementioned 'runahead' changes because I've put them in a series of simple "Moved X to task_pool" commits.