Update to os::Timer behavior in 2.7

Peter Soetens <[email protected]>
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <CAMYDobVaj+jC1wMpDCiQ2jVB3N-cCH77raeBkuSR7u1ee1bO8w@mail.gmail.com>
We're having issues in a cleanup phase of the os::Timer class since
killing a timer (killTimer) does not wait for timeout() to return. So
the timer you're killing might still be executing when killTimer
returns, causing trouble furtheron when accessing/cleaning up
resources.

The solution is to make all these functions synchronise with timeout,
but still allow to modify the timer from within timeout() by using a
recursive mutex.

https://github.com/psoetens/orocos-rtt/commit/6ce2bc01a8c56ccab79eccfe6327b183484be6b5

Alternative would be to not modify Timer.cpp and to guard the timeout
+ cleanup in user code with a mutex.

Any remarks ?

Peter
-- 
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.