Function

dispatch_io_set_high_water

Sets the maximum number of bytes to process before enqueueing a handler block.

Declaration

void dispatch_io_set_high_water(dispatch_io_t channel, size_t high_water);

Parameters

channel

The channel whose high-water mark you want to configure.

high_water

The maximum number of bytes to read or write before enqueueing the corresponding I/O handler block.

Discussion

During a read or write operation, the channel uses the high- and low-water mark values to determine how often to enqueue the associated handler block. It enqueues the block when the number of bytes read or written is between these two values.

The default high-water mark for channels is set to SIZE_MAX.

See Also

Managing the File Descriptor

dispatch_io_get_descriptor

Returns the file descriptor associated with the specified channel.

dispatch_io_set_interval

Sets the interval (in nanoseconds) at which to invoke the I/O handlers for the channel.

dispatch_io_interval_flags_t

The type for flags used to specify the dispatch interval of a channel.

dispatch_io_set_low_water

Sets the minimum number of bytes to process before enqueueing a handler block.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software