dispatch.dispatcher (version 1.6)
index
/home/mcfletch/pylive/dispatch/dispatcher.py

Multiple-producer-multiple-consumer signal-dispatching
 
dispatcher is the core of the PyDispatcher system,
providing the primary API and the core logic for the
system.
 
Module attributes of note:
 
        Any -- Singleton used to signal either "Any Sender" or
                "Any Signal".  See documentation of the _Any class.
        Anonymous -- Singleton used to signal "Anonymous Sender"
                See documentation of the _Anonymous class.
 
Internal attributes:
        WEAKREF_TYPES -- tuple of types/classes which represent
                weak references to receivers, and thus must be de-
                referenced on retrieval to retrieve the callable
                object
        connections -- { senderkey (id) : { signal : [receivers...]}}
        senders -- { senderkey (id) : weakref(sender) }
                used for cleaning up sender references on sender
                deletion
        sendersBack -- { receiverkey (id) : [senderkey (id)...] }
                used for cleaning up receiver references on receiver
                deletion, (considerably speeds up the cleanup process
                vs. the original code.)

 
Modules
       
dispatch.errors
dispatch.robustapply
dispatch.saferef
types
weakref

 
Classes
       
_Parameter
_Anonymous
_Any

 
class _Anonymous(_Parameter)
    Singleton used to signal "Anonymous Sender"
 
The Anonymous object is used to signal that the sender
of a message is not specified (as distinct from being
"any sender").  Registering callbacks for Anonymous
will only receive messages sent without senders.  Sending
with anonymous will only send messages to those receivers
registered for Any or Anonymous.
 
Note:
        The default sender for connect is Any, while the
        default sender for send is Anonymous.  This has
        the effect that if you do not specify any senders
        in either function then all messages are routed
        as though there was a single sender (Anonymous)
        being used everywhere.
 
  Methods inherited from _Parameter:
__repr__(self)

 
class _Any(_Parameter)
    Singleton used to signal either "Any Sender" or "Any Signal"
 
The Any object can be used with connect, disconnect,
send, or sendExact to signal that the parameter given
Any should react to all senders/signals, not just
a particular sender/signal.
 
  Methods inherited from _Parameter:
__repr__(self)

 
class _Parameter
    Used to represent default parameter values.
 
  Methods defined here:
__repr__(self)

 
Data
        Anonymous = _Anonymous
Any = _Any
WEAKREF_TYPES = (<type 'weakref'>, <class 'dispatch.saferef.BoundMethodWeakref'>)
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = '$Id: dispatcher.py,v 1.6 2004/02/18 00:29:46 mcfletch Exp $'
__file__ = '/home/mcfletch/pylive/dispatch/dispatcher.pyc'
__name__ = 'dispatch.dispatcher'
__version__ = '1.6'
connections = {}
generators = _Feature((2, 2, 0, 'alpha', 1), (2, 3, 0, 'final', 0), 4096)
senders = {}
sendersBack = {}

 
Author
        Patrick K. O'Brien <pobrien@orbtech.com>