CCScheduler should afford performTaskInCocosThread function.

//-------------------------------------------------------------------------
CCScheduler.h
Add code:
std::future<bool> performTaskInCocosThread(std::function<bool()> &function);
std::vector<std::packaged_task<bool()>> _tasksToPerform;
//-------------------------------------------------------------------------
CCSchedluer.cpp
modify CCSchedler::update()
if( !_tasksToPerform.empty()){
		_performMutex.lock();
		auto tempQueue = std::move(_tasksToPerform);//save queue,avoid deadlock
		_tasksToPerform.clear();//maybe doesn't use it,because std::move() can do this
		_performMutex.unlock();
	for( auto &task : tempQueue ) {
                       auto tempTask=std::move(task);
			tempTask();
        }
}
/**
* a new method
***/
std::future<bool> Scheduler::performTaskInCocosThread(const std::function<bool ()> &function)
{
	std::packaged_task<bool()> task(function);
	std::future<void> res=task.get_future();

	_performMutex.lock();

    _tasksToPerform.push_back(std::move(task));

    _performMutex.unlock();
	return res;
}

//------------------------------------------------------------------------------
So we can use performTaskInCocosThread  to do some function in cocosthread,that can tell us cocosthread has finished run the function that we pass.
The function return true mean normal exit,return false unnormal exit.
Sometimes we don't need return value,why not use void?
another  reason return void is bug of Mircrosoft.
See that :
https://connect.microsoft.com/VisualStudio/feedback/details/791185/std-packaged-task-t-where-t-is-void-or-a-reference-class-are-not-movable 
I intend to use git push this code,this is my first time to upload my code.
Prudence as well
Thanks a lot！！