Yes it would work, stop can be called from any thread. It's a bit clunky though. What would the ideal API for your task look like? A "doWork()" function that does a bounded amount of work rather than blocking like run()?
Yes. The API function I am trying to implement is processMessagesTimed(int milliseconds) It processes messages for the specified interval and returns. So a runFor(interval) would be ideal for me. But any version of run() that would eventually return would be OK, e.g. processAllOutstandingEvents(), processOneEvent(). These are probably more generally useful. A file descriptor that could be polled for qpid activity? That would be nice, but probably overkill and non-portable. Just a boolean function to tell me there is work to do would be helpful. -- View this message in context: http://n2.nabble.com/Interupting-SubscriptionManager%3A%3Arun%28%29-tp2634272p2635706.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]
