First of all, I am a very new Objective C / Cocoa iOS Developer, but I used to write C / C ++ applications.
I managed to run the Rabbitmq-c client (http://hg.rabbitmq.com/rabbitmq-c/) inside my iPhone application, and I can connect directly to Rabbitmq from my application and even use the queue element, so everything is fine.
Now my problem is that my iPhone application needs to use the rabbitmq-c library to poll incoming messages from the server. There will probably be an endless loop.
Should I take this to a new thread? Ideally, I want to wrap the rabbitmq-c class as an object of the Async Object C class and use NSNotification (or something similar) to notify my user interface. I am a little inclined to create a new thread, since I read about materials such as Runloop, etc., It can solve many problems without using an additional thread.
What is best for me? Any examples of code or directions would be helpful. Please remember that I am not dealing with the Objective C / Coca rabbitmq library here, I am using C code in my iPhone application.
thank
Subrat
source
share