Example #1
0
void JobTracker::Play() {
	if (get_player_num() == 0) {
		myturn_ = true;
	}
	while(!myturn_) { 
		if (cancel_) {
			Log().Debug() << "[MsgFlow] job canceled, I'm job " << get_id();
			UpdateStatusAndNotify(JobStatus::CANCELED);
		}
	}

	ClearPlaylist();
	ListenPlayer(*job_, true);
	
	UpdateStatusAndNotify(JobStatus::RUNNING);

	Log().Debug() << "[MsgFlow] Start torque job, I'm job " << get_id();
	job_->GoPlay();
}
Example #2
0
void Tracker::add_jobtracker(std::shared_ptr<JobTracker> child) {
	playlist_.push_back(child);
	ListenPlayer(*child);
}