'Adds ``key`` to the list of callbacks.'

def register_callback(self, key):

    if (self.pending_callbacks is None):
        self.pending_callbacks = set()
        self.results = {}
    if (key in self.pending_callbacks):
        raise KeyReuseError(('key    %r    is    already    pending' % (key,)))
    self.pending_callbacks.add(key)
