Hi, I have a small question. Suppose we have a component A, which runs in a certain thread (and which is executed periodically). Component B has an eventPort which is connected to an output port of component A. If component A puts data on this port, will the updatehook of component B be executed in the same thread of A? i.e. if component B's updatehook can take some time, will this break the (fast) periodic execution of A?
Thanks Ruben vp
event triggered component
Hi Ruben,
On Tue, Feb 23, 2016 at 10:36 AM, <ruben [dot] vanparys [..] ...> wrote:
> Hi, I have a small question.
> Suppose we have a component A, which runs in a certain thread (and which is
> executed periodically). Component B has an eventPort which is connected to
> an
> output port of component A. If component A puts data on this port, will the
> updatehook of component B be executed in the same thread of A? i.e. if
> component B's updatehook can take some time, will this break the (fast)
> periodic execution of A?
>
Given that you did not assign any special activity to component B, it
always executes in its own thread. Writing to an event port only triggers
the component's activity and the default activity will make sure that the
updateHook runs at least once completely after this event.
The exact timing depends on priorities and how many threads can run in
parallel on your system. For the case that only one processor core is
available and component B has a higher priority than A, the scheduler would
indeed switch to component B first before continuing the execution of A.
But in most other cases component A will first finish its cycle or
component B runs in parallel.
>
> Thanks
> Ruben vp
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
Cheers,
Johannes