Package afx :: Module pubsub :: Class wfq
[hide private]
[frames] | no frames]

Class wfq

source code

object --+
         |
        wfq

I'm a simple prioritized fair queue. I'm like a regular channel, except that when users get from me, I return the min item.


To Do: rename this

Instance Methods [hide private]
 
__init__(self, n=0, *args, **kwargs)
Initializer.
source code
 
put(self, x) source code
 
get(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, n=0, *args, **kwargs)
(Constructor)

source code 
Initializer.
Parameters:
  • n (int) - maximum size of this queue, or None for infinite
  • args - extra args to pass into the structs.Heap
  • kwargs - extra kwargs to pass
Overrides: object.__init__

put(self, x)

source code 
Decorators:
  • @af.task

get(self)

source code 
Decorators:
  • @af.task