summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5c3d55f)
In the unlikely event that the thread doesn't terminate fast enough after
setting the goal pointer, deleting it would send it a kill signal.
Remove this possibility by explicitly jouning the thread.
TrainRoutePlanner::~TrainRoutePlanner()
{
TrainRoutePlanner::~TrainRoutePlanner()
{
+ if(thread)
+ {
+ thread->join();
+ delete thread;
+ }
}
TrainRoutePlanner::Result TrainRoutePlanner::plan()
}
TrainRoutePlanner::Result TrainRoutePlanner::plan()
{
if(result==PENDING && goal)
{
{
if(result==PENDING && goal)
{
+ if(thread)
+ {
+ thread->join();
+ delete thread;
+ thread = 0;
+ }
- delete thread;
- thread = 0;