Revision: 41719
http://brlcad.svn.sourceforge.net/brlcad/?rev=41719&view=rev
Author: davidloman
Date: 2010-12-20 15:10:55 +0000 (Mon, 20 Dec 2010)
Log Message:
-----------
Debug printing disabling/cleanup. Made selector loop only try to read on
returned FDs (instead of the hotwired solution of trying to read on all FDs
each loop). This eliminated blocking on a call to pkg_suckin.
Modified Paths:
--------------
rt^3/trunk/src/libNet/PortalManager.cxx
Modified: rt^3/trunk/src/libNet/PortalManager.cxx
===================================================================
--- rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-20 14:39:02 UTC (rev
41718)
+++ rt^3/trunk/src/libNet/PortalManager.cxx 2010-12-20 15:10:55 UTC (rev
41719)
@@ -101,7 +101,7 @@
while (this->runCmd) {
/* Set values EVERY loop since select() on *nix modifies this.
*/
timeout.tv_sec = 0;
- timeout.tv_usec = 100 * 1000;
+ timeout.tv_usec = 50 * 1000;
this->masterFDSLock.lock();
readfds = masterfds;
@@ -111,7 +111,7 @@
/* Shelect!! */
int retVal = select(fdmax + 1, &readfds, NULL, &exceptionfds,
&timeout);
- /* */
+ /*
if (retVal != 0) {
QString out("Select returned: ");
out.append(QString::number(retVal));
@@ -121,13 +121,11 @@
out.append(QString::number(fdmax));
this->log->logINFO("PortalManager", out);
}
- /* */
+ */
if (retVal < 0) {
/* got a selector error */
-
this->log->logERROR("PortalManager", "Selector Error: "
+ QString::number(errno));
-
break;
}
@@ -141,7 +139,7 @@
/* Simplify switching later with bools now */
isListener = (i == listener);
- readyRead = true; /* FD_ISSET(i, &readfds) &&
!isListener; */
+ readyRead = FD_ISSET(i, &readfds) && !isListener;
readyAccept = FD_ISSET(i, &readfds) && isListener;
readyException = FD_ISSET(i, &exceptionfds);
@@ -159,8 +157,6 @@
Portal* p = NULL;
/* Accept new connections: */
if (readyAccept) {
- /* log->logINFO("PortalManager", "Accept"); */
-
struct pkg_switch* table =
this->makeNewSwitchTable();
PkgTcpClient* client =
@@ -200,8 +196,6 @@
/* read */
if (readyRead) {
- /* this->log->logINFO("PortalManager", "Read");
*/
-
int readResult = p->read();
if (readResult == 0) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits