Gcell.set_singleton()

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

On Wed, Jul 02, 2008 at 12:35:12PM -0600, Chuck Swiger wrote:

 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs