aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage/llpumpio.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmessage/llpumpio.cpp30
1 files changed, 28 insertions, 2 deletions
diff --git a/linden/indra/llmessage/llpumpio.cpp b/linden/indra/llmessage/llpumpio.cpp
index c92612f..467502b 100644
--- a/linden/indra/llmessage/llpumpio.cpp
+++ b/linden/indra/llmessage/llpumpio.cpp
@@ -41,6 +41,7 @@
41#include "llapr.h" 41#include "llapr.h"
42#include "llmemtype.h" 42#include "llmemtype.h"
43#include "llstl.h" 43#include "llstl.h"
44#include "llstat.h"
44 45
45// These should not be enabled in production, but they can be 46// These should not be enabled in production, but they can be
46// intensely useful during development for finding certain kinds of 47// intensely useful during development for finding certain kinds of
@@ -176,7 +177,8 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) :
176 mCurrentPool(NULL), 177 mCurrentPool(NULL),
177 mCurrentPoolReallocCount(0), 178 mCurrentPoolReallocCount(0),
178 mChainsMutex(NULL), 179 mChainsMutex(NULL),
179 mCallbackMutex(NULL) 180 mCallbackMutex(NULL),
181 mCurrentChain(mRunningChains.end())
180{ 182{
181 LLMemType m1(LLMemType::MTYPE_IO_PUMP); 183 LLMemType m1(LLMemType::MTYPE_IO_PUMP);
182 initialize(pool); 184 initialize(pool);
@@ -269,6 +271,16 @@ bool LLPumpIO::setTimeoutSeconds(F32 timeout)
269 return true; 271 return true;
270} 272}
271 273
274void LLPumpIO::adjustTimeoutSeconds(F32 delta)
275{
276 // If no chain is running, bail
277 if(mRunningChains.end() == mCurrentChain)
278 {
279 return;
280 }
281 (*mCurrentChain).adjustTimeoutSeconds(delta);
282}
283
272static std::string events_2_string(apr_int16_t events) 284static std::string events_2_string(apr_int16_t events)
273{ 285{
274 std::ostringstream ostr; 286 std::ostringstream ostr;
@@ -514,7 +526,10 @@ void LLPumpIO::pump(const S32& poll_timeout)
514 //llinfos << "polling" << llendl; 526 //llinfos << "polling" << llendl;
515 S32 count = 0; 527 S32 count = 0;
516 S32 client_id = 0; 528 S32 client_id = 0;
517 apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); 529 {
530 LLPerfBlock polltime("pump_poll");
531 apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd);
532 }
518 PUMP_DEBUG; 533 PUMP_DEBUG;
519 for(S32 ii = 0; ii < count; ++ii) 534 for(S32 ii = 0; ii < count; ++ii)
520 { 535 {
@@ -1161,3 +1176,14 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
1161 mTimer.stop(); 1176 mTimer.stop();
1162 } 1177 }
1163} 1178}
1179
1180void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
1181{
1182 LLMemType m1(LLMemType::MTYPE_IO_PUMP);
1183 if(mTimer.getStarted())
1184 {
1185 F64 expiry = mTimer.expiresAt();
1186 expiry += delta;
1187 mTimer.setExpiryAt(expiry);
1188 }
1189}