def __init__(self, block=False, disable_timing=False, interprocess=False): self.ptr = None if interprocess and not disable_timing: raise ValueError('Timing must be disabled for interprocess events') flag = ((block and runtime.eventBlockingSync) | (disable_timing and runtime.eventDisableTiming) | (interprocess and runtime.eventInterprocess)) self.ptr = runtime.eventCreateWithFlags(flag)
def __init__(self, block=False, disable_timing=False, interprocess=False): self.ptr = 0 if interprocess and not disable_timing: raise ValueError('Timing must be disabled for interprocess events') flag = ((block and runtime.eventBlockingSync) | (disable_timing and runtime.eventDisableTiming) | (interprocess and runtime.eventInterprocess)) self.ptr = runtime.eventCreateWithFlags(flag)