From: Alex Rousskov Date: Thu, 27 Oct 2011 22:08:28 +0000 (-0600) Subject: Rename Ipc::FewToFewBiQueue method peek() to findOldest() X-Git-Tag: BumpSslServerFirst.take01~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aac671b3815d34860aa0851492b765f8b77c6ea;p=thirdparty%2Fsquid.git Rename Ipc::FewToFewBiQueue method peek() to findOldest() to better match the method functionality. --- diff --git a/src/DiskIO/IpcIo/IpcIoFile.cc b/src/DiskIO/IpcIo/IpcIoFile.cc index 3c81770697..e27a167ad1 100644 --- a/src/DiskIO/IpcIo/IpcIoFile.cc +++ b/src/DiskIO/IpcIo/IpcIoFile.cc @@ -362,7 +362,7 @@ IpcIoFile::canWait() const return true; // no timeout specified IpcIoMsg oldestIo; - if (!queue->peek(diskId, oldestIo) || oldestIo.start.tv_sec <= 0) + if (!queue->findOldest(diskId, oldestIo) || oldestIo.start.tv_sec <= 0) return true; // we cannot estimate expected wait time; assume it is OK const int oldestWait = tvSubMsec(oldestIo.start, current_time); diff --git a/src/ipc/Queue.h b/src/ipc/Queue.h index c562379d5f..b9d6e2b3a4 100644 --- a/src/ipc/Queue.h +++ b/src/ipc/Queue.h @@ -201,9 +201,9 @@ public: /// calls OneToOneUniQueue::push() using the given process queue template bool push(const int remoteProcessId, const Value &value); - // TODO: rename to findOldest() or some such - /// calls OneToOneUniQueue::peek() using the given process queue - template bool peek(const int remoteProcessId, Value &value) const; + /// finds the oldest item in incoming and outgoing queues between + /// us and the given remote process + template bool findOldest(const int remoteProcessId, Value &value) const; /// returns true if pop() would have probably succeeded but does not pop() bool popReady() const; @@ -367,7 +367,7 @@ FewToFewBiQueue::push(const int remoteProcessId, const Value &value) template bool -FewToFewBiQueue::peek(const int remoteProcessId, Value &value) const +FewToFewBiQueue::findOldest(const int remoteProcessId, Value &value) const { // we may be called before remote process configured its queue end if (!validProcessId(remoteGroup(), remoteProcessId))