Ignore:
Timestamp:
Mar 31, 2015, 2:56:34 AM (7 years ago)
Author:
Peter
Message:

refs #800

Avoid using parents and children terminologoy to describe Job
relationships as it was confusing. Move add_dependency function from
class Scheduler::Job to class Scheduler. Likewise move observers to
class Job rather than holding an extra map<Job, observers> in
Scheduler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/scheduler.cc

    r3348 r3401  
    6262  scheduler.submit(sleeper[1]);
    6363  sleeper.push_back(boost::make_shared<Sleeper>(2));
    64   sleeper.back()->add_dependency(sleeper[0]);
     64  scheduler.add_dependency(sleeper[2], sleeper[0]);
    6565  sleeper.push_back(boost::make_shared<Sleeper>(3));
    6666
    6767  // not strictly needed since sleeper2 depends on sleeper0,
    6868  // but... this is a test
    69   sleeper.back()->add_dependency(sleeper[0]);
    70   sleeper.back()->add_dependency(sleeper[1]);
    71   sleeper.back()->add_dependency(sleeper[2]);
     69  scheduler.add_dependency(sleeper[3], sleeper[0]);
     70  scheduler.add_dependency(sleeper[3], sleeper[1]);
     71  scheduler.add_dependency(sleeper[3], sleeper[2]);
    7272
    7373  scheduler.submit(sleeper[3]);
Note: See TracChangeset for help on using the changeset viewer.