Releases the lock.

def unlock(self):
        """
        Releases the lock.
        """
        return self._encode_invoke(lock_unlock_codec, thread_id=thread_id(),
                                   reference_id=self.reference_id_generator.get_and_increment())