[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gump
Subject:    cvs commit: gump/python/gump/model workspace.py
From:       ajack () apache ! org
Date:       2004-06-30 18:41:58
Message-ID: 20040630184158.81967.qmail () minotaur ! apache ! org
[Download RAW message or body]

ajack       2004/06/30 11:41:58

  Modified:    python/gump/runner Tag: CleanUp demand.py
               python/gump/test/resources/full1 Tag: CleanUp workspace.xml
               python/gump/model Tag: CleanUp workspace.py
  Log:
  Can't do N things at once...
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.3.2.4   +9 -5      gump/python/gump/runner/demand.py
  
  Index: demand.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/runner/demand.py,v
  retrieving revision 1.3.2.3
  retrieving revision 1.3.2.4
  diff -u -r1.3.2.3 -r1.3.2.4
  --- demand.py	29 Jun 2004 20:52:02 -0000	1.3.2.3
  +++ demand.py	30 Jun 2004 18:41:58 -0000	1.3.2.4
  @@ -67,14 +67,14 @@
           GumpRunner.__init__(self,run)
   
       ###########################################
  -    def spawnUpdateThreads(self):
  +    def spawnUpdateThreads(self, updaters=1):
           
           self.workList=ThreadWorkList('Updates')
           for module in self.run.gumpSet.getModuleSequence():
               self.workList.addWork(UpdateWork(self,module))    
               
           # Create a group of workers...
  -        self.group=WorkerThreadGroup('Update',5,self.workList,UpdateWorker)
  +        self.group=WorkerThreadGroup('Update',updaters,self.workList,UpdateWorker)
           self.group.start()
           
       def waitForThreads(self):
  @@ -117,8 +117,11 @@
           
           gumpSet=self.run.getGumpSet()
           
  -        # Experimental...
  -        self.spawnUpdateThreads()
  +        workspace = self.run.getWorkspace()
  +        
  +        if workspace.isMultithreading() and workspace.hasUpdaters():
  +            # Experimental...
  +            self.spawnUpdateThreads(workspace.getUpdaters())
           
           # In order...
           for project in gumpSet.getProjectSequence():
  @@ -141,7 +144,8 @@
               #invokeGarbageCollection(self.__class__.__name__)
               #printTopRefs(100,'After GC')
           
  -        self.waitForThreads()
  +        if workspace.isMultithreading() and workspace.hasUpdaters():    
  +            self.waitForThreads()
           
           self.finalize()    
           
  
  
  
  No                   revision
  No                   revision
  1.7.4.1   +1 -0      gump/python/gump/test/resources/full1/workspace.xml
  
  Index: workspace.xml
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/test/resources/full1/workspace.xml,v
  retrieving revision 1.7
  retrieving revision 1.7.4.1
  diff -u -r1.7 -r1.7.4.1
  --- workspace.xml	6 Apr 2004 17:27:12 -0000	1.7
  +++ workspace.xml	30 Jun 2004 18:41:58 -0000	1.7.4.1
  @@ -11,6 +11,7 @@
   
     <profile href="profile.xml"/>
   
  +  <threads updaters="1" builders="0" />
     <nag to='test@apache.org' from='test@apache.org'/>
     
   </workspace>
  
  
  
  No                   revision
  No                   revision
  1.51.2.13 +2 -2      gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
  retrieving revision 1.51.2.12
  retrieving revision 1.51.2.13
  diff -u -r1.51.2.12 -r1.51.2.13
  --- workspace.py	30 Jun 2004 16:02:36 -0000	1.51.2.12
  +++ workspace.py	30 Jun 2004 18:41:58 -0000	1.51.2.13
  @@ -340,9 +340,9 @@
           if self.hasDomChild('threads'):
               threads=self.getDomChild('threads')
               if hasDomAttribute(threads,'updaters'):
  -                self.updaters=int(getDomAttribute(threads,'updaters'))
  +                self.updaters=int(getDomAttributeValue(threads,'updaters'))
               if hasDomAttribute(threads,'builders'):
  -                self.builders=int(getDomAttribute(threads,'builders'))
  +                self.builders=int(getDomAttributeValue(threads,'builders'))
                                                                
           # Complete the properies
           self.completeProperties()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic