CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
psClasses.queueNode Class Reference

Public Member Functions

def __init__
 
def append
 
def pendingThreads
 
def queueWeight
 

Public Attributes

 QueueSem
 
 RunningThreads
 
 ThreadLog
 

Detailed Description

Definition at line 184 of file psClasses.py.

Constructor & Destructor Documentation

def psClasses.queueNode.__init__ (   self,
  cores = 4,
  jay = 2 
)

Definition at line 185 of file psClasses.py.

186  def __init__(self,cores = 4,jay = 2):
187  self.QueueSem = BoundedSemaphore(value=cores/jay)
188  self.RunningThreads = []
189  self.ThreadLog = []

Member Function Documentation

def psClasses.queueNode.append (   self,
  item 
)

Definition at line 190 of file psClasses.py.

Referenced by diclist.diclist.add(), and BeautifulSoup.Tag.setString().

191  def append(self,item):
192  self.RunningThreads.append(item)
193  t=time.time()
194  self.ThreadLog.append([t,item.BuildNode.LibName,"INFO: %s thread %s added for Library %s" % (t,item.name,item.BuildNode.LibName)])
def psClasses.queueNode.pendingThreads (   self)

Definition at line 195 of file psClasses.py.

References psClasses.queueNode.RunningThreads.

196  def pendingThreads(self):
197  return len([x for x in self.RunningThreads if x.is_alive()])
def psClasses.queueNode.queueWeight (   self)

Definition at line 198 of file psClasses.py.

References psClasses.queueNode.RunningThreads.

199  def queueWeight(self):
200  return sum([x.Weight for x in self.RunningThreads if x.is_alive()])
201 
202 

Member Data Documentation

psClasses.queueNode.QueueSem

Definition at line 186 of file psClasses.py.

psClasses.queueNode.RunningThreads

Definition at line 187 of file psClasses.py.

Referenced by psClasses.queueNode.pendingThreads(), and psClasses.queueNode.queueWeight().

psClasses.queueNode.ThreadLog

Definition at line 188 of file psClasses.py.