Ignore:
Timestamp:
Dec 12, 2019, 1:44:06 AM (3 years ago)
Author:
Peter
Message:

merge release 0.16.3 into trunk.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/test/scheduler.cc

    r3826 r3851  
    22
    33/*
    4   Copyright (C) 2014, 2015, 2017 Peter Johansson
     4  Copyright (C) 2014, 2015, 2017, 2019 Peter Johansson
    55
    66  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    6161    suite.err() << "threads(): " << n_threads << " - expected: 2\n";
    6262  }
     63  for (size_t i=0; i<10; ++i)
     64    scheduler.submit(boost::make_shared<Sleeper>(i < 4 ? 1 : 0));
     65  // sleep a sec to give the Scheduler chance to process submitted jobs
     66  sleep(1);
     67  int n = scheduler.jobs();
     68  suite.out() << "jobs: " << n << "\n";
     69  if (n < 8 || n > 10) {
     70    suite.add(false);
     71    suite.err() << "error: jobs() returned: " << n << "; expected 8-10\n";
     72  }
     73
    6374  std::vector<boost::shared_ptr<Sleeper> > sleeper;
    6475  sleeper.reserve(4);
     
    7788
    7889  scheduler.submit(sleeper[3]);
    79   suite.out() << "jobs: " << scheduler.jobs() << "\n";
    8090  scheduler.wait();
    8191  return suite.return_value();
Note: See TracChangeset for help on using the changeset viewer.