discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gcell.set_singleton()


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] gcell.set_singleton()
Date: Wed, 2 Jul 2008 11:43:49 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

On Wed, Jul 02, 2008 at 12:35:12PM -0600, Chuck Swiger wrote:
> In gr-gcell/src/qa_fft.py there is a method of gcell called 'set_singleton'.
>
>    gcell.set_singleton(self.mgr)
>
> All I can glean from the source is it has something to do with boost weak 
> pointers. What, basically, is it doing?   I've played with the python code 
> to stream data to multiple spe's and it all works as expected.  All I know 
> is that if it's commented out we get:
>
>    terminate called after throwing an instance of 'boost::bad_weak_ptr'
>      what():  tr1::bad_weak_ptr
>    Aborted
>
>
> From boost:
>
>     weak_ptr          <boost/weak_ptr.hpp>    Non-owning observers of an 
> object 
> owned by shared_ptr.
>
> --Chuck


gcell.set_singleton stores away the gc_job_manager object that the
gr-gcell (N.B., not gcell) code uses.  The various work methods that
want to use gcell need to be able to find the job manager.  They
retrieve it by calling gc_job_manager::singleton().

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]