readInBackgroundAndNotifyForModes:
Reads from the file or communications channel in the background and posts a notification when finished.
- (void)readInBackgroundAndNotifyForModes:(NSArray *)modes
Parameters
- modes
- The runloop modes in which the read completion notification can be posted.
Discussion of [NSFileHandle readInBackgroundAndNotifyForModes]
See
readInBackgroundAndNotify
for details of how this method operates. This method differs fromreadInBackgroundAndNotify
in that modes specifies the run-loop mode (or modes) in which NSFileHandleReadCompletionNotification
can be posted.
You must call this method from a thread that has an active run loop.
Example of [NSFileHandle readInBackgroundAndNotifyForModes]