Skip to content

Delete Component thread after finishing a task #1037

Answered by LeStarch
sheershak-agarwal asked this question in Q&A
Discussion options

You must be logged in to vote
  1. Active components with no messages to process do very little. This is because they are in an Os supplied sleep waiting on a queue message and are not scheduled to run until a message arrives. It does use a bit of memory, but since flight software typically allocates memory up-front, we don't typically worry about de-allocating this.
  2. You may call .exit() to shutdown the thread if you really want to. This is done in the reference topology when exiting. This will exit the thread's life cycle. .join exists to, if you need to wait for it to exit. See:
    rateGroup1Comp.exit();
  3. You could by-hand instantiate an Os::Task and have it …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sheershak-agarwal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants