What is the standard way for using QPID with other event-driven tools that want 
to control the dispatch loop (like Xt and Qt)?

I was thinking of calling SubscriptionManager::run() periodically. I am 
considering something like this. Can stop() be called in another thread like 
this? (I.E. not in a listener) Is there a better way?

void *waitThread(void *arg);

void processQpidMessageForAWhile()
{
  pthread_t thread;
  pthread_create(&thread, NULL, waitThread, NULL);
  mySubscriptionManager.run();
}

void *waitThread(void *arg)
{
   usleep(/* some interval */);
   mySubscriptionManager.stop();
}

Thanks in advance,
Rick
-- 
View this message in context: 
http://n2.nabble.com/Interupting-SubscriptionManager%3A%3Arun%28%29-tp2634272p2634272.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to