Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Terminating a thread
Topic Summary:
Created On: 25-May-2007 15:33
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 25-May-2007 15:33
User is offline View Users Profile Print this message


Rianto Rahman

Posts: 1
Joined: 7-Apr-2005

I need to perform a graceful shutdown of all the tasks and threads within Rhapsody. I used the OMThread::stopAllThreads(NULL) and invoked this function from a separate task (called the shutdown task).

All the tasks seem to go down gracefully, but the Timer thread seems to be still running. Any ideas on how to terminate this? There are couple of active classes which make use of a timer.

Appreciate any help..

Rianto
Report this to a Moderator Report this to a Moderator
 21-Jun-2007 13:53
User is offline View Users Profile Print this message


Martin Stockl

Posts: 307
Joined: 30-Jun-2004

This is not a straight forward thing... a full shutdown of the framework is not really planned, since embedded applications typically never end.

The framework creates four Singleton objects (OMMainThread, OMThreadManager, OMTimerManager, [RTOS]OSFactory) and a TimerHeap during startup in OXF::initialize().
These act as global services, available to any dynamically created object, trying to use the OXF services at any time.

Removing those is not that easy on all OSes.

If you run the framework as a process in a heavy weight process based OS (like Unix, Linux, Windows, etc.) then the OS will do the final memory cleanup during exit().

For small thread based OSes this is manual work. Switching such a system off is the preferred way...

You may want to have a look into the OS specific implementations of OMOS::endApplication() in various OSALs.
These get shipped with the product, e.g. compare VxWorks vs. Linux implementation - a big difference.

Hope that helps.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.