'Removes a previously added event listener.'

def remove_listener(self, callback):

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