Example #1
0
		bool doLoad() {
			AsyncValue<ModuleInstance> tmp;
		repeat:
			if(nextModule>=(int)modules.size()) return true;
			try {
				if(modules[nextModule].host)
					tmp=host->loadModule(modules[nextModule].path.c_str());
				else tmp=server->loadModule(modules[nextModule].path.c_str());
			} catch(exception& ex) {
				onError(modules[nextModule].path.c_str(),ex);
				throw;
			}
			if(tmp) {
				printSuccess(tmp());
				nextModule++;
				goto repeat;
			}
			tmp.wait({&ModuleLoader::loadCB,this});
			return false;
		}