From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/llmessage/llpumpio.cpp | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'linden/indra/llmessage/llpumpio.cpp') 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 @@ #include "llapr.h" #include "llmemtype.h" #include "llstl.h" +#include "llstat.h" // These should not be enabled in production, but they can be // intensely useful during development for finding certain kinds of @@ -176,7 +177,8 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) : mCurrentPool(NULL), mCurrentPoolReallocCount(0), mChainsMutex(NULL), - mCallbackMutex(NULL) + mCallbackMutex(NULL), + mCurrentChain(mRunningChains.end()) { LLMemType m1(LLMemType::MTYPE_IO_PUMP); initialize(pool); @@ -269,6 +271,16 @@ bool LLPumpIO::setTimeoutSeconds(F32 timeout) return true; } +void LLPumpIO::adjustTimeoutSeconds(F32 delta) +{ + // If no chain is running, bail + if(mRunningChains.end() == mCurrentChain) + { + return; + } + (*mCurrentChain).adjustTimeoutSeconds(delta); +} + static std::string events_2_string(apr_int16_t events) { std::ostringstream ostr; @@ -514,7 +526,10 @@ void LLPumpIO::pump(const S32& poll_timeout) //llinfos << "polling" << llendl; S32 count = 0; S32 client_id = 0; - apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); + { + LLPerfBlock polltime("pump_poll"); + apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd); + } PUMP_DEBUG; for(S32 ii = 0; ii < count; ++ii) { @@ -1161,3 +1176,14 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout) mTimer.stop(); } } + +void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta) +{ + LLMemType m1(LLMemType::MTYPE_IO_PUMP); + if(mTimer.getStarted()) + { + F64 expiry = mTimer.expiresAt(); + expiry += delta; + mTimer.setExpiryAt(expiry); + } +} -- cgit v1.1 From a87e38229921b48c32187c672a942516722f1b52 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 11 Jan 2009 16:10:39 -0600 Subject: Second Life viewer sources 1.22.5-RC --- linden/indra/llmessage/llpumpio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/llmessage/llpumpio.cpp') diff --git a/linden/indra/llmessage/llpumpio.cpp b/linden/indra/llmessage/llpumpio.cpp index 467502b..01a43ec 100644 --- a/linden/indra/llmessage/llpumpio.cpp +++ b/linden/indra/llmessage/llpumpio.cpp @@ -6,7 +6,7 @@ * * $LicenseInfo:firstyear=2004&license=viewergpl$ * - * Copyright (c) 2004-2008, Linden Research, Inc. + * Copyright (c) 2004-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab -- cgit v1.1