Contents

nonBlocking

Indicates that opening the file doesn’t wait for the file or device to become available.

Declaration

static var nonBlocking: FileDescriptor.OpenOptions { get }

Mentioned in

Discussion

If this option is specified, the system doesn’t wait for the device or file to be ready or available. If the doc:FileDescriptor/open(_:_:options:permissions:retryOnInterrupt:)-2266j call would result in the process being blocked for some reason, that method returns immediately. This flag also has the effect of making all subsequent input and output operations on the open file nonblocking.

The corresponding C constant is O_NONBLOCK.

See Also

Specifying Options