Package coro :: Module _coro :: Class fifo
[hide private]
[frames] | no frames]

Class fifo

object --+
         |
        fifo

First-in First-Out container.

This uses a linked list.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__len__(x)
len(x)
a new object with type S, a subtype of T
__new__(T, S, ...)
 
pop(...)
Pop an object from the head of the FIFO.
 
pop_all(...)
Pop all objects from the FIFO.
 
push(...)
Push an object to the end of the FIFO.

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

Instance Variables [hide private]
  cv
: A condition variable.
  fifo
: The fifo object.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

pop(...)

 

Pop an object from the head of the FIFO.

This blocks if the FIFO is empty.

Returns:
Returns the next object from the FIFO.

pop_all(...)

 

Pop all objects from the FIFO.

This will block if the fifo is empty and wait until there is an element to pop.

Returns:
Returns a list of objects. Returns an empty list if the FIFO is empty.

push(...)

 
Push an object to the end of the FIFO.
Parameters:
  • thing - : The thing to add to the FIFO.

Instance Variable Details [hide private]

cv

: A condition variable. (C only.)

fifo

: The fifo object. (C only.)