Jump to content

Recommended Posts

Posted

I would say raising objections in stop_phase() is not valid. From the description:

The stop_phase task is called when this component’s enable_stop_interrupt bit is set and <global_stop_request> is called during a task-based phase, e.g., run.

So stop_phase() is called as a result of the objection count for the current phase returning to zero and the current phase ending. Therefore you should not raise further objections on the current phase because it's already ended.

Upon return from stop_phase, a component signals it is ready to be stopped.

The current phase will not end until the stop_phase execution is complete, therefore there is no need to raise objections.
Posted

You can use objections for any purpose, but spawning a set of new processes during stop is likely to be counter to the intent.

The stop_phase was really intended as a pre-objection, objection mechanism. I would not recommend using the stop_phase at all.

The cleanup subphase might be a better choice for this kind of activity.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...