Package lacewing :: Module idpool :: Class IDPool
[frames] | no frames]

Class IDPool

source code

object --+
         |
        IDPool

Instance Methods
 
__init__(self, start=0)
Initializes a new pool, counting from start
source code
 
pop(self)
Take out an ID from the pool, and wait for it to be put back again (see putBack)
source code
 
putBack(self, id)
Puts back a previously popped ID.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, start=0)
(Constructor)

source code 

Initializes a new pool, counting from start

Overrides: object.__init__

pop(self)

source code 

Take out an ID from the pool, and wait for it to be put back again (see putBack)

Returns:
A new ID from the pool.