boost::shared_ptr<IModule> CConfigTaskManager::GetNextTask(){
		//
		if(HasTasks()){
			return tasks.front();
		} else {
			return boost::shared_ptr<IModule>();
		}
	}
示例#2
0
文件: scheduler.cpp 项目: UIKit0/taco
	static fiber * GetNextFiber()
	{
		fiber * next = HasTasks() ? GetInactiveFiber() : GetNextScheduledFiber();
		next = (next == nullptr) ? GetInactiveFiber() : next;
		return next;
	}
	void CConfigTaskManager::RemoveAllTasks(){
		//
		if(HasTasks()){
			tasks.erase(tasks.begin(),tasks.end());
		}
	}