| Summary: | G4MTcoutDestination does not flush output streams | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Andrea Dotti <andrea.dotti> |
| Component: | global/management | Assignee: | Andrea Dotti <andrea.dotti> |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 10.0 | ||
| Hardware: | All | ||
| OS: | All | ||
I will take care of fixing this issue. I report here for book-keeping. Andrea Tag global-V10-00-26 proposed for testing. Fix implemented in tag global-V10-00-26. |
G4MTcoutDestination::ReceiveCout and ReceiveCerr do not add std::flush after adding to output. This may cause issues (apparent missing output) if the application is started with buffering of cout/cerr (for example if application is started in a python wrapper). Methods should be modified adding: finalcout<<prefix<<id // <<" "<<G4StateManager::GetStateManager()->GetStateString(sta) - <<" > "<<msg; + <<" > "<<msg<<std::flush I do realize this is quite a corner case. But we should fix that. Andrea