'Remove all observers with function func'

def remove_observer(self, func):

    with self.observerLock:
        i = 0
        while (i < len(self.observers)):
            ofunc = self.observers[i][0]
            if (ofunc == func):
                del self.observers[i]
            else:
                i += 1
