Platforms to show: All Mac Windows Linux Cross-Platform

DispatchIOMBS class   New in 25.3

Type Topic Plugin Version macOS Windows Linux iOS Targets
class DispatchIO MBS MacOSX Plugin 25.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Dispatch I/O provides both stream and random access asynchronous read and write operations on file descriptors.

One or more dispatch I/O channels may be created from a file descriptor as either the kTypeStream type or kTypeRandom type. Once a channel has been created the application may schedule asynchronous read and write operations.

The application may set policies on the dispatch I/O channel to indicate the desired frequency of I/O handlers for long-running operations.

Dispatch I/O also provides a memory management model for I/O buffers that avoids unnecessary copying of data when pipelined between channels. Dispatch I/O monitors the overall memory pressure and I/O access patterns for the application to optimize resource utilization.

Flags

Constant Value Description
kCloseFlagStop 1 If used, the system will make a best effort to interrupt any outstanding read and write operations on the I/O channel, otherwise those operations will run to completion normally. P
kIntervalFlagStrictInterval 1 Enqueue I/O handlers at a channel's interval setting even if the amount of data ready to be delivered is inferior to the low water mark (or zero).
kOFlagAppend 8 Append to existing file
kOFlagCreate &h200 Create file if it doesn't exist.
kOFlagReadOnly 0 Open file read only.
kOFlagReadWrite 2 Open file read & write.
kOFlagTruncate &h400 Truncate existing file.
kOFlagWriteOnly 1 Open file write only.
kTypeRandom 1 A dispatch I/O channel representing a random access file. Read and write operations on a channel of this type may be performed concurrently and read/write data at the specified offset. Offsets are interpreted relative to the file pointer position current at the time the I/O channel is created. Attempting to create a channel of this type for a file descriptor that is not seekable will result in an error.
kTypeStream 0 A dispatch I/O channel representing a stream of bytes. Read and write operations on a channel of this type are performed serially (in order of creation) and read/write data at the file pointer position that is current at the time the operation starts executing. Operations of different type (read vs. write) may be performed simultaneously. Offsets passed to operations on a channel of this type are ignored.

This class has no sub classes.

Blog Entries

Release notes

  • Version 25.3
    • Added DispatchDataMBS or DispatchIOMBS classes.

Some related classes:


The items on this page are in the following plugins: MBS MacOSX Plugin.


DispatchDataMBS   -   DisplayMBS


The biggest plugin in space...