'This is used to add a callback our pending list of callbacks.
If reverse is specified we will invoke the callback in the opposite order that we added it'

def add_callback(self, fn, *args, **kwargs):

    time_added = time.time()
    self.pending_callbacks.put((self.priority, (fn, args, kwargs, time_added)))
    if (not reversed):
        self.priority += 1
    else:
        self.priority -= 1
