hi everyone, I'm writing a mac osx app that needs to talk to a serial device.
There's a well known protocol to adhere to (implemented in the device firmware) and is a kind of a half-duplex synchronous protocol where if i send a message to the device from my app i have to wait till i get a response from the device, inspect it and then i'm allowed to send another message. This has to go for several messages i need to send to the device. Given this synchronous nature, i'm trying to keep the UI free so i'm doing all the messaging stuff on background threads. My choice is to use NSOperation and NSOperationQueue, where the queue is configured with maxConcurrentOperations set to 1 in order to have a strict serial behavior (this is due to the constraints given by the implemented protocol). How can i make an NSOperation subclass waiting for a signal given by the serial port delegate to make it fire isFinished KVO to the queue and make that queue consequently execute the next NSOperation? Does this approach make sense to you? I'm open to any suggestions of course. Thank you! Vanni _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com