CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
psClasses.queueNode Class Reference

Public Member Functions

def __init__ (self, cores=4, jay=2)
 
def append (self, item)
 
def pendingThreads (self)
 
def queueWeight (self)
 

Public Attributes

 QueueSem
 
 RunningThreads
 
 ThreadLog
 

Detailed Description

Definition at line 184 of file psClasses.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 185 of file psClasses.py.

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

Member Function Documentation

◆ append()

def psClasses.queueNode.append (   self,
  item 
)

Definition at line 190 of file psClasses.py.

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

References psClasses.queueNode.RunningThreads, and psClasses.queueNode.ThreadLog.

Referenced by diclist.diclist.add().

◆ pendingThreads()

def psClasses.queueNode.pendingThreads (   self)

Definition at line 195 of file psClasses.py.

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

References psClasses.queueNode.RunningThreads.

◆ queueWeight()

def psClasses.queueNode.queueWeight (   self)

Definition at line 198 of file psClasses.py.

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

References psClasses.queueNode.RunningThreads.

Member Data Documentation

◆ QueueSem

psClasses.queueNode.QueueSem

Definition at line 186 of file psClasses.py.

◆ RunningThreads

psClasses.queueNode.RunningThreads

◆ ThreadLog

psClasses.queueNode.ThreadLog

Definition at line 188 of file psClasses.py.

Referenced by psClasses.queueNode.append().

mps_setup.append
append
Definition: mps_setup.py:85