Fix Tango::CallBack thread safety in tests
In several of the tests we define a callback class that inherits from Tango::CallBack
. I count 35 occurrences of this:
> grep -R ":\s*public Tango::CallBack" tests | wc -l
35
The documentation for Tango::CallBack
states:
... where the callback method could be executed concurently [sic] by different threads started by the ORB. The user has to code his callback method in a thread safe manner.
However, in most (all?) cases in the tests directory we are not doing anything to synchronise access to the Tango::CallBack
objects. In most cases this probably doesn't cause an issue in practice, although it may lead to flaky tests.
Regardless, the tests should lead by example and be thread safe. In most cases this probably just requires guarding access to the Tango::CallBack
's member variables with a mutex.