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 Tue, 14 Apr 2009 22:22:56 GMT


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:users-subscribe@qpid.apache.org


Mime
View raw message