'Creates an event
asynch
if True handler\'s are executes asynchronous
exc_info
if True, result will contain sys.exc_info()[:2] on error
lock
threading.RLock used to synchronize execution
sender
event\'s sender. The sender is passed as the first argument to the
handler, only if is not None. For this case the handler must have
a placeholder in the arguments to receive the sender
threads
maximum number of threads that will be started
traceback
if True, the execution result will contain sys.exc_info()
on error. exc_info must be also True to get the traceback
hash = self.hash(handler)
Handlers are stored in a dictionary that has as keys the handler\'s hash
handlers = {
hash : (handler, memoize, timeout),
hash : (handler, memoize, timeout), ...
The execution result is cached using the following structure
memoize = {
hash : ((args, kwargs, result), (args, kwargs, result), ...),
hash : ((args, kwargs, result), ...), ...
The execution result is returned as a tuple having this structure
exec_result = (
(True, result, handler),        # on success
(False, error_info, handler),   # on error
(None, None, handler), ...      # asynchronous execution'

def __init__(self, name=None, sender=None, asynch=False, exc_info=False, lock=None, threads=3, traceback=False):

    self.name = name
    self.asynchronous = asynch
    self.exc_info = exc_info
    self.lock = lock
    self.sender = sender
    self.threads = threads
    self.traceback = traceback
    self.handlers = {}
    self.memoize = {}
