close_io_deviceT_close_io_deviceCloseIoDeviceCloseIoDeviceclose_io_device (算子)

名称

close_io_deviceT_close_io_deviceCloseIoDeviceCloseIoDeviceclose_io_device — 关闭指定的输入/输出设备。

签名

close_io_device( : : IODeviceHandle : )

Herror T_close_io_device(const Htuple IODeviceHandle)

void CloseIoDevice(const HTuple& IODeviceHandle)

void HIODevice::CloseIoDevice() const

static void HOperatorSet.CloseIoDevice(HTuple IODeviceHandle)

void HIODevice.CloseIoDevice()

def close_io_device(iodevice_handle: HHandle) -> None

描述

算子 close_io_deviceclose_io_deviceCloseIoDeviceCloseIoDeviceCloseIoDeviceclose_io_device closes the I/O device specified by IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleiodevice_handle. In particular, all associated channels are closed (i.e., close_io_channelclose_io_channelCloseIoChannelCloseIoChannelCloseIoChannelclose_io_channel is called implicitly on all channels that had been opened for this device) and allocated memory for data buffers is released.

执行信息

此算子修改后续输入参数的状态:

在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。

参数

IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleiodevice_handle (输入控制,状态被修改)  io_device HIODevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the opened I/O device.

结果

如果参数有效,算子 close_io_deviceclose_io_deviceCloseIoDeviceCloseIoDeviceCloseIoDeviceclose_io_device 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。在这种情况下,可以设置扩展错误信息,并可进行查询通过算子 get_extended_error_infoget_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_info

可能的前趋

open_io_deviceopen_io_deviceOpenIoDeviceOpenIoDeviceOpenIoDeviceopen_io_device

模块

基础