Comments: The separation between the internal method called in caller thread and the user method in callee thread looks overkill.
More rational reasons as to why it is bad: - it has a race condition. Since the operation and the task are in two different threads, isConfigured() might be e.g. true when you test it and false one line of code later. - when the component is not running, there can be no lock contention that blocks the caller for a long period of time (the component is doing nothing). Even if it was the case, one can call operations asynchronously. - when the component is running, the lock contention can still be present in your version as you call the user operation - what you did is extremely expensive compilation-time wise as you have to have two operations and do a C++ operation call. - it is ugly on the component interface side as it makes the internal operation visible (instead of having a single setXXX operation) Quick code review: - you introduce a change of behaviour in argument_signature: you add either a leading or trailing space in the returned string if one of the with_ parameters are false. - please use __orogen_ as prefix for the internal method (instead of the _internal suffix), it would match the 'hidden' __orogen_getTID operation that is already added by orogen. Finally, I did not get the change of interface for the user method(s), and why it was necessary -- Dr. Ing. Sylvain Joyeux Space and Security Robotics Besuchsadresse der Nebengeschäftstelle: DFKI GmbH Robotics Innovation Center Robert-Hooke-Straße 5 28359 Bremen, Germany Postadresse der Hauptgeschäftsstelle Standort Bremen: DFKI GmbH Robotics Innovation Center Robert-Hooke-Straße 1 28359 Bremen, Germany Phone: +49 421 178 45-4136 Zentrale: +49 421 178 45-0 Fax: +49 421 178 45-4150 (Faxe bitte namentlich kennzeichnen) 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 --------------------------------------------------------------------- _______________________________________________ Rock-dev mailing list [email protected] http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
