bool LLPumpIO::addChain(const chain_t& chain, F32 timeout) { LLMemType m1(LLMemType::MTYPE_IO_PUMP); if(chain.empty()) return false; #if LL_THREADS_APR LLScopedLock lock(mChainsMutex); #endif LLChainInfo info; info.setTimeoutSeconds(timeout); info.mData = LLIOPipe::buffer_ptr_t(new LLBufferArray); LLLinkInfo link; #if LL_DEBUG_PIPE_TYPE_IN_PUMP lldebugs << "LLPumpIO::addChain() " << chain[0] << " '" << typeid(*(chain[0])).name() << "'" << llendl; #else lldebugs << "LLPumpIO::addChain() " << chain[0] <<llendl; #endif chain_t::const_iterator it = chain.begin(); chain_t::const_iterator end = chain.end(); for(; it != end; ++it) { link.mPipe = (*it); link.mChannels = info.mData->nextChannel(); info.mChainLinks.push_back(link); } mPendingChains.push_back(info); return true; }
bool LLPumpIO::addChain( const LLPumpIO::links_t& links, LLIOPipe::buffer_ptr_t data, LLSD context, F32 timeout) { LLMemType m1(LLMemType::MTYPE_IO_PUMP); // remember that if the caller is providing a full link // description, we need to have that description matched to a // particular buffer. if(!data) return false; if(links.empty()) return false; #if LL_THREADS_APR LLScopedLock lock(mChainsMutex); #endif #if LL_DEBUG_PIPE_TYPE_IN_PUMP lldebugs << "LLPumpIO::addChain() " << links[0].mPipe << " '" << typeid(*(links[0].mPipe)).name() << "'" << llendl; #else lldebugs << "LLPumpIO::addChain() " << links[0].mPipe << llendl; #endif LLChainInfo info; info.setTimeoutSeconds(timeout); info.mChainLinks = links; info.mData = data; info.mContext = context; mPendingChains.push_back(info); return true; }
bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request) { if(chain.empty()) return false; #if LL_THREADS_APR LLScopedLock lock(mChainsMutex); #endif LLChainInfo info; info.mHasCurlRequest = has_curl_request; info.setTimeoutSeconds(timeout); info.mData = LLIOPipe::buffer_ptr_t(new LLBufferArray); info.mData->setThreaded(has_curl_request); LLLinkInfo link; #if LL_DEBUG_PIPE_TYPE_IN_PUMP LL_DEBUGS() << "LLPumpIO::addChain() " << chain[0] << " '" << typeid(*(chain[0])).name() << "'" << LL_ENDL; #else LL_DEBUGS() << "LLPumpIO::addChain() " << chain[0] <<LL_ENDL; #endif chain_t::const_iterator it = chain.begin(); chain_t::const_iterator end = chain.end(); for(; it != end; ++it) { link.mPipe = (*it); link.mChannels = info.mData->nextChannel(); info.mChainLinks.push_back(link); } mPendingChains.push_back(info); return true; }