'Removes a previously added event listener.'

def remove_listener(self, callback):

    with self._listeners_lock:
        for (i, (cb, _)) in enumerate(self._listeners):
            if (callback == cb):
                del self._listeners[i]
