Skip to content
Snippets Groups Projects
Commit 73989d6d authored by Ruud Overeem's avatar Ruud Overeem
Browse files

Task #1418: Give ParentControl time to send the quit-command.

parent a661cc88
No related branches found
No related tags found
No related merge requests found
......@@ -732,7 +732,7 @@ GCFEvent::TResult PythonControl::finishing_state(GCFEvent& event, GCFPortInterfa
_passMetadatToOTDB();
CONTROLQuitedEvent msg;
msg.cntlrName = itsMyName;
msg.result = CT_RESULT_NO_ERROR;
msg.result = itsFeedbackResult;
itsParentPort->send(msg);
GCFScheduler::instance()->stop();
break;
......
......@@ -51,7 +51,12 @@ int main(int argc, char* argv[])
PythonControl pyc(argv[1]);
pyc.start(); // make initial transition
GCFScheduler::instance()->run();
GCFScheduler::instance()->setDelayedQuit(true);
GCFScheduler::instance()->run(); // until stop was called.
pc->quit(); // let tasks quit nicely.
pyc.quit();
GCFScheduler::instance()->run(0.3); // let tasks die.
} catch( Exception &ex ) {
LOG_FATAL_STR("Caught exception: " << ex);
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment