U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » Cout() buffering problem
Cout() buffering problem [message #34108] Wed, 19 October 2011 00:08 Go to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Sorry for a kind of noobish question.
While making some lengthy evaluation, app outputs some info to Cout(). In Gnome terminal, app gives no output for all the time evaluation continues. As soon as evaluation process is finished, all the output data is displayed in terminal at once.

I tried to add Cout().Flush(), but it didn't change anything.
Someone must have met the same problem under *nix. How did you manage to force output to terminal without caching?
Re: Cout() buffering problem [message #34109 is a reply to message #34108] Wed, 19 October 2011 07:22 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi,

Stream::Flush() only flushes the streams internal buffers, but it doesn't affect the OS buffers flushing. IMHO it would make sense to change this behavior, but for now you can just call fflush(stdout), it will do the trick Wink

Best regards,
Honza
Previous Topic: [BUG] ArrayMap::Create<TT>: implicit downcast
Next Topic: Bug in XmlParser
Goto Forum:
  


Current Time: Mon May 04 14:21:10 GMT+2 2026

Total time taken to generate the page: 0.00669 seconds