Re: [Rock-dev] adding boost::shared_pointer and boost::weak_pointer to rtt/rock?

Sylvain Joyeux <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <[email protected]>
On 09/09/2013 01:54 PM, Matthias Goldhoorn wrote:
> On 09.09.2013 13:42, Sylvain Joyeux wrote:
>> On 09/09/2013 01:03 PM, Matthias Goldhoorn wrote:
>>> "Moin moin",
>>>
>>> What would be needed to add some of the boost shared_pointer structures
>>> to rock/rtt?
>>> special boost::shared_pointer and boost::weak_pointer?
>> You most probably don't want to do that. boost::shared_pointer and
>> boost::weak_pointer have bad multi-threading semantics.
> maybe stuffing this into the smart_ptr for locking/unlocking?
Eh ???
>> Again, what is the actual situation / use case / problem you are trying
>> to solve ?
> The use case is a library which hardly uses these structures for
> internal handing (lists/vectors of 3D Point-cloud data).
> Pointcloude -> segmentation -> feature extraction -> post processing
> (and in between often visualization).
> The plan was to add rock between the -> for
> transport/replay/debugging/modularization. To be as compatible to the
> original library implementation it would be nice to have support for
> the mentioned data-structures.
"Because the library uses it" is hardly a good enough reason. Unless
there is more, use ro_ptr for transport which *has* good multi-threading
semantics. In principle, it was designed for being efficient at
pipelining, unfortunately RTT2.0 introduced OLD_DATA *with* saving the
old sample which made the optimization useless ... We can discuss how to
make it disappear (by e.g. introducing a new policy type in which the
old data sample is not saved)

In any case:
  - adding locking in shared_ptr makes no sense if you are distributing
the processing (because no two components would run at the same time).
ro_ptr does.
  - if you serialize the processing (by e.g. using the fbsched), ro_ptr
is as good as smart_ptr

-- 
Sylvain Joyeux (Dr.Ing.)
Senior Researcher

Space & Security Robotics
Underwater Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: [email protected]

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
----------------------------------------------------------------------- 

-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.