You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nmittal <nm...@rblt.com> on 2009/04/30 22:11:13 UTC

SimpleProducer example inherits from Runnable.. curious why?

Hi All, in the examples that come with the CMS distribution, I see the
following...
class SimpleProducer: public Runnable

is there a reason why a producer has to inherit from Runnable. The run()
function is called like any other functions.

any insight is appreciated.

thanks
Nishant
-- 
View this message in context: http://www.nabble.com/SimpleProducer-example-inherits-from-Runnable..-curious-why--tp23322600p23322600.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: SimpleProducer example inherits from Runnable.. curious why?

Posted by nmittal <nm...@rblt.com>.
Understood. Thanks.


Timothy Bish wrote:
> 
> On Thu, 2009-04-30 at 13:11 -0700, nmittal wrote:
>> Hi All, in the examples that come with the CMS distribution, I see the
>> following...
>> class SimpleProducer: public Runnable
>> 
>> is there a reason why a producer has to inherit from Runnable. The run()
>> function is called like any other functions.
>> 
>> any insight is appreciated.
>> 
>> thanks
>> Nishant
> 
> It doesn't really have to be, but that code is just a cut and paste from
> the main example file in src/example/main.cpp.  It doesn't hurt anything
> that it does so it was never removed.  
> 
> Regards
> Tim
> 
> -- 
> Tim Bish
> http://fusesource.com
> http://timbish.blogspot.com/
> 
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/SimpleProducer-example-inherits-from-Runnable..-curious-why--tp23322600p23333245.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: SimpleProducer example inherits from Runnable.. curious why?

Posted by Timothy Bish <ta...@gmail.com>.
On Thu, 2009-04-30 at 13:11 -0700, nmittal wrote:
> Hi All, in the examples that come with the CMS distribution, I see the
> following...
> class SimpleProducer: public Runnable
> 
> is there a reason why a producer has to inherit from Runnable. The run()
> function is called like any other functions.
> 
> any insight is appreciated.
> 
> thanks
> Nishant

It doesn't really have to be, but that code is just a cut and paste from
the main example file in src/example/main.cpp.  It doesn't hurt anything
that it does so it was never removed.  

Regards
Tim

-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/