Package buildbot :: Module locks :: Class SlaveLock
[frames | no frames]

Class SlaveLock

ComparableMixin --+
                  |
                 SlaveLock


I am a semaphore that limits simultaneous actions on each buildslave.

Builds and BuildSteps can declare that they wish to claim me as they run. Only a limited number of such builds or steps will be able to run simultaneously on any given buildslave. By default this number is one, but my maxCount parameter can be raised to allow two or three or more operations to happen on a single buildslave at the same time.

Use this to protect a resource that is shared among all the builds taking place on each slave, for example to limit CPU or memory load on an underpowered machine.

Each buildslave will get an independent copy of this semaphore. By default each copy will use the same owner count (set with maxCount), but you can provide maxCountForSlave with a dictionary that maps slavename to owner count, to allow some slaves more parallelism than others.
Method Summary
  __init__(self, name, maxCount, maxCountForSlave)
    Inherited from ComparableMixin
  __cmp__(self, them)
  __hash__(self)

Class Variable Summary
list compare_attrs = ['name', 'maxCount', '_maxCountForSlaveL...
classobj lockClass = buildbot.locks.RealSlaveLock
    Inherited from ComparableMixin
Implements __implemented__ = <implementedBy buildbot.util.Comparabl...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Class Variable Details

compare_attrs

Type:
list
Value:
['name', 'maxCount', '_maxCountForSlaveList']                          

Generated by Epydoc 2.1 on Sun Dec 10 22:04:45 2006 http://epydoc.sf.net