|
From: | Matt Flax |
Subject: | exiting embedded mode gracefully |
Date: | Sat, 7 May 2016 16:33:52 +1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
Hi there, I am having a problem, would like some help with please. When I start octave, it is the usual mechanism (as shown here https://www.gnu.org/software/octave/doc/v4.0.1/Standalone-Programs.html): octave_main((int)argsIn.size(), (char**)&argsIn[0], embedded); When I exit octave in the usual manner ( clean_up_and_exit(0)) I get a complete exit ... i.e. the whole process seems to end ... without continuing the thread execution through the C++ destructors in my code base ... for example : clean_up_and_exit(0) cout<<"this doesn't get printed !"<<endl; If I set safe to return (rather then sleeping = clean_up_and_exit(0, true)) the thread still ends prematurely ! If I don't execute the "clean_up_and_exit" function, then I get a segmentation fault. Any ideas what to change in the process to get an exit with the completion of the thread ? thanks Matt |
[Prev in Thread] | Current Thread | [Next in Thread] |