Revision: 40842
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40842&view=rev
Author:   davidloman
Date:     2010-09-29 16:54:46 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Make Portal fire off a RouteMsgJob to release the selector thread from the work 
of Routing the NetMsg.

Modified Paths:
--------------
    rt^3/trunk/src/libNet/Portal.cxx

Modified: rt^3/trunk/src/libNet/Portal.cxx
===================================================================
--- rt^3/trunk/src/libNet/Portal.cxx    2010-09-29 16:52:48 UTC (rev 40841)
+++ rt^3/trunk/src/libNet/Portal.cxx    2010-09-29 16:54:46 UTC (rev 40842)
@@ -32,6 +32,7 @@
 #include "NetMsgRouter.h"
 #include "RemoteNodenameSetMsg.h"
 #include "TypeOnlyMsg.h"
+#include "RouteMsgJob.h"
 
 Portal::Portal(PortalManager* pm, PkgTcpClient* client, struct pkg_switch* 
table):
 pm(pm), pkgClient(client), callbackTable(table), log(Logger::getInstance()), 
handshakeComplete(false)
@@ -189,9 +190,7 @@
                bu_log("WARNING!  NULL Portal.\n");
        }
 
-       //TODO Split the code here?  Fire off a Job?
 
-
        /* Build a NetMsg */
        NetMsg* msg = NetMsgFactory::getInstance()->deserializeNetMsg(ba, p);
 
@@ -208,8 +207,10 @@
                return;
        }
 
-       //Route
-       NetMsgRouter::getInstance()->routeMsg(msg);
+       //Fire off a Job.  This keeps the selector loop from
+       //delivering all the Msg copies personally.
+       RouteMsgJob* job = new RouteMsgJob(msg);
+       job->submit();
 }
 
 void


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to