TaskContext execution sequence

Hello,
I have two TaskContext associated with two PeriodicActivity running at the same frequency. According to the manual, I know that these two Components will run on the same thread because they have the same period. However, in the timing chart which one will be executed first? Is it the first one that has been started?


Thank you,

Philippe Hamelin

TaskContext execution sequence

On Wednesday 03 December 2008 20:38:04 Philippe Hamelin wrote:
> Hello,
> I have two TaskContext associated with two PeriodicActivity running at the
> same frequency. According to the manual, I know that these two Components
> will run on the same thread because they have the same period. However, in
> the timing chart which one will be executed first? Is it the first one that
> has been started?

Yes. However, if you want to fine-control ordering of tasks in the same thread,
a SlaveActivity might be more appropriate for you. This will require one
taskcontext to be the (implicit) 'periodic master', which calls
slavetask->engine()->getActivity()->execute() in C++ or slavetask.execute() in
scripting for each period on each slave.

You need to setup the master-slave relation yourself in C++ or scripting.

Peter