def __init__(self, maxsize=0): PriorityQueue.__init__(self, maxsize) self.queue_name = "QUEUE" self.lock = threading.Lock() self.currentItem = None self.min_priority = 0 self.amActive = False self.stop = threading.Event()
def __init__(self, G = None, from_list = False): PriorityQueue.__init__(self) self.counter = 0 if not from_list and G: for node in G.getNodes(): for neigh in G.getEdges(node): #PriorityQueue.put(self, ((node, neigh), self.counter G.getWeight(node, neigh))) PriorityQueue.put(self, ( (G.getWeight(node, neigh), self.counter, (node, neigh)))) elif from_list: for edge in from_list: n1, n2, w = edge PriorityQueue.put(self, ( (w, self.counter, (n1, n2))))
def __init__(self, maxsize = 0, batch_len = None): """ Initialize the queue @params: `maxsize` : The maxsize of the queue `batch_len`: What's the length of a batch """ if not batch_len: raise ValueError('`batch_len` is required for PQueue.') PriorityQueue.__init__(self, maxsize) self.batch_len = batch_len self.lock = Lock()
def __init__(self, mysqlHost, mysqlUser, mysqlPasswd, mysqlDatabase, poolSize=10): PriorityQueue.__init__(self) self.isDestroying = False self.condition = threading.Condition() self.poolSize = poolSize if self.poolSize < 1: self.poolSize = 10 self.pool = PooledDB( mysql.connector, self.poolSize, database=mysqlDatabase, user=mysqlUser, passwd=mysqlPasswd, host=mysqlHost ) self.__buildFromDB()
def __init__(self, G=None, from_list=False): PriorityQueue.__init__(self) self.counter = 0 if not from_list and G: for node in G.getNodes(): for neigh in G.getEdges(node): #PriorityQueue.put(self, ((node, neigh), self.counter G.getWeight(node, neigh))) PriorityQueue.put(self, ((G.getWeight(node, neigh), self.counter, (node, neigh)))) elif from_list: for edge in from_list: n1, n2, w = edge PriorityQueue.put(self, ((w, self.counter, (n1, n2))))
def __init__(self, mysqlHost, mysqlUser, mysqlPasswd, mysqlDatabase, poolSize=10): PriorityQueue.__init__(self) self.isDestroying = False self.condition = threading.Condition() self.poolSize = poolSize if self.poolSize < 1: self.poolSize = 10 self.pool = PooledDB(mysql.connector, self.poolSize, database=mysqlDatabase, user=mysqlUser, passwd=mysqlPasswd, host=mysqlHost) self.__buildFromDB()
def __init__(self, *args, **kargs): PriorityQueue.__init__(self, *args, **kargs)
def __init__(self, size): """Initialize a priority queue of given size.""" PriorityQueue.__init__(self, size) self.size = 0
def __init__(self, node_manager): self._node_manager = node_manager PriorityQueue.__init__(self)
def __init__(self): PriorityQueue.__init__(self)
def __init__(self, limit = 0): PriorityQueue.__init__(self, limit) self.max_prio = 0
def __init__(self): PriorityQueue.__init__(self) self.size = 0 return
def __init__(self): PriorityQueue.__init__(self) self.counter = 0 self.put_counter = 0 self.get_counter = 0
def __init__(self, limit = 0): PriorityQueue.__init__(self, limit) self.max_prio = 0 self.none_send = False
def __init__(self, maxPQ=False): PriorityQueue.__init__(self) self.reverse = -1 if maxPQ else 1
def __init__(self, comparableObj): PriorityQueue.__init__(self) self.comparableObj = comparableObj self.count = 0
def __init__(self): PriorityQueue.__init__(self) self.first_element_changed = Condition(self.mutex)
def __init__(self): PriorityQueue.__init__(self) #self.all_items = set() self.counter = 0
def __init__(self, limit): PriorityQueue.__init__(self) self.counter = 0 self.upperlimmit = limit self.lowesrscore = 0
def __init__(self, limit=0): PriorityQueue.__init__(self, limit) self.max_prio = 0
def __init__(self, limit=0): PriorityQueue.__init__(self, limit) self.max_prio = 0 self.none_send = False
def __init__(self): PriorityQueue.__init__(self) self.counter = 0