Revision c1934706 mininet/net.py

View differences:

mininet/net.py
101 101
from mininet.util import quietRun, fixLimits, numCores, ensureRoot
102 102
from mininet.util import macColonHex, ipStr, ipParse, netParse, ipAdd
103 103
from mininet.term import cleanUpScreens, makeTerms
104
from multiprocessing.pool import ThreadPool
104 105

  
105 106
# Mininet version: should be consistent with README and LICENSE
106 107
VERSION = "2.1.0+"
......
159 160

  
160 161
        self.terms = []  # list of spawned xterm processes
161 162

  
163
        self.pool = ThreadPool( 64 )
164

  
162 165
        Mininet.init()  # Initialize Mininet if necessary
163 166

  
164 167
        self.built = False
......
374 377
            info( switchName + ' ' )
375 378

  
376 379
        info( '\n*** Adding links:\n' )
380
        # need to 'asynchronize' this too
377 381
        for srcName, dstName in topo.links(sort=True):
378 382
            src, dst = self.nameToNode[ srcName ], self.nameToNode[ dstName ]
379 383
            params = topo.linkInfo( srcName, dstName )
380 384
            srcPort, dstPort = topo.port( srcName, dstName )
381 385
            self.addLink( src, dst, srcPort, dstPort, **params )
386
            #self.pool.apply( self.addLink,  ( src, dst, srcPort, dstPort, params, ) )
387
            #self.pool.apply_async( self.addLink, args = ( src, dst )+ params, kwds = { 'Port1':srcPort, 'Port2':dstPort } )
382 388
            info( '(%s, %s) ' % ( src.name, dst.name ) )
383

  
389
        #self.pool.close()
390
        #self.pool.join()
384 391
        info( '\n' )
385 392

  
386 393
    def configureControlNetwork( self ):

Also available in: Unified diff