def ipc_array_test(ipcarr, result_queue):
    try:
        with ipcarr as darr:
            arr = darr.copy_to_host()
            try:
                with ipcarr:
                    pass
            except ValueError as e:
                if (str(e) != 'IpcHandle is already opened'):
                    raise AssertionError('invalid exception message')
            else:
                raise AssertionError('did not raise on reopen')
    except:
        succ = False
        out = traceback.format_exc()
    else:
        succ = True
        out = arr
    result_queue.put((succ, out))
def ipc_array_test(ipcarr, result_queue):
    try:
        with ipcarr as darr:
            arr = darr.copy_to_host()
            try:
                with ipcarr:
                    pass
            except ValueError as e:
                if (str(e) != 'IpcHandle is already opened'):
                    raise AssertionError('invalid exception message')
            else:
                raise AssertionError('did not raise on reopen')
    except:
        succ = False
        out = traceback.format_exc()
    else:
        succ = True
        out = arr
    result_queue.put((succ, out))