File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,9 @@ class ClingoApp : public Clasp::Cli::ClaspAppBase {
210210 auto prt = [&]() { out.printModelValues (ctx, mdl); };
211211 // NOTE: the function can only be called while the solve handle is alive
212212 auto guard = CppClingo::Control::unlock_guard{ctl_->slv ->get_lock ()};
213+ std::cout.flush ();
213214 app_.print_model (ctl_->slv ->map_model (mdl), prt);
215+ std::cout.flush ();
214216 });
215217 return output;
216218 }
Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ class App : public reference_keeper<App> {
139139 auto &app = *static_cast <App *>(data);
140140 CLINGO_TRY {
141141 app.print_model (Model{model}, [printer, printer_data]() { handle_error (printer (printer_data)); });
142+ py::module_::import (" sys" ).attr (" stdout" ).attr (" flush" )();
142143 }
143144 CLINGO_CATCH;
144145 }
You can’t perform that action at this time.
0 commit comments