-void
-JobManager::priority_changed ()
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
-
- bool first = true;
- BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
- if (first) {
- if (i->is_new ()) {
- i->start ();
- } else if (i->paused_by_priority ()) {
- i->resume ();
- }
- first = false;
- } else {
- if (i->running ()) {
- i->pause_by_priority ();
- }
- }
- }
- }
-
- emit (boost::bind (boost::ref (JobsReordered)));
-}