Reading is not done by the main process, writing by another thread (IPC)

Jean-Baptiste PASSOT | Scientist
passot@braincorporation.com
C: 858.220.1861
T: 858.845.6195
 
Brain Corporation™
QRC-130A13
5665 Morehouse Drive 
San Diego, CA 92121
www.braincorporation.com








On Sep 5, 2013, at 1:48 PM, Jonathan Hunt <notifications@github.com> wrote:

> In libardrone/libardrone.py:
> 
> > @@ -172,6 +251,69 @@ def halt(self):
> >          self.ipc_thread.join()
> >          self.lock.release()
> >  
> > +    def get_image(self):
> > +        self.lock.acquire()
> > +        _im = np.copy(self.image)
> > +        self.lock.release()
> > +        return _im
> > +
> > +    def get_navdata(self):
> > +        self.lock.acquire()
> why do you need this locking - isn't there only one thread writing this location?
> 
> —
> Reply to this email directly or view it on GitHub.
>