I'm using NSFileHandle readInBackgroundAndNotify
to read data from pipe. But until application system status bar menu is opened I don't receive NSFileHandleReadCompletionNotification
notification. If menu is collapsed everything works fine.
How to solve this problem?
Everything started working as it should after changing NSFileHandle call
from:
[handle readInBackgroundAndNotify]
to:
[handle readInBackgroundAndNotifyForModes:[NSArray arrayWithObject:NSRunLoopCommonModes]]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.