def METHOD_NAME(self):
    """Invoked by the camera thread when a new frame is available."""
    now = time.time()
    remove = None
    for ident, event in self.events.items():
        if not event[0].isSet():
            # if this client's event is not set, then set it
            # also update the last set timestamp to now
            event[0].METHOD_NAME()
            event[1] = now
        else:
            # if the client's event is already set, it means the client
            # did not process a previous frame
            # if the event stays set for more than 5 seconds, then assume
            # the client is gone and remove it
            if now - event[1] > 5:
                remove = ident
    if remove:
        del self.events[remove]