qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RickW <rick....@in-deptheng.com>
Subject Re: Interupting SubscriptionManager::run()
Date Thu, 16 Apr 2009 15:02:44 GMT

It turns out this:


void *waitThread(void *arg);

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

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


only works once. After calling stop() once, subsequent calls to run() do nothing. (stop()
"closes" the queue, whatever that means). Unless you all consider that a bug that will eventually
be fixed I'm going to pursue Adam's suggestion of using LocalQueues.
-- 
View this message in context: http://n2.nabble.com/Interupting-SubscriptionManager%3A%3Arun%28%29-tp2634272p2642900.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:users-subscribe@qpid.apache.org


Mime
View raw message