Contents

readInBackgroundAndNotify(forModes:)

Reads from the file or communications channel in the background and posts a notification when finished.

Declaration

func readInBackgroundAndNotify(forModes modes: [RunLoop.Mode]?)

Parameters

  • modes:

    The runloop modes in which the read completion notification can be posted.

Discussion

See readInBackgroundAndNotify() for details of how this method operates. This method differs from readInBackgroundAndNotify() in that modes specifies the run-loop mode (or modes) in which readCompletionNotification can be posted.

You must call this method from a thread that has an active run loop.

See Also

Related Documentation

Reading Asynchronously with Notifications