in reply to Progress bar with (i)threads

Are you suffering from buffering? Flush your filehandle after the print and see if it helps. One way to do that in your case would be simply to add a newline to the string.

Replies are listed 'Best First'.
Re^2: Progress bar with (i)threads
by PockMonk (Beadle) on Dec 08, 2006 at 11:42 UTC
    Thank you for the reply. I'm not saying its definitely not a buffering problem but I don't think it is since it doesn't get printed EVER, even when the other thread is joined and prints its results. I tried adding a newline character to the end of the string, no difference.

    Additionally, when the main thread exits it warns "A thread exited while 2 threads were running" as if the progress bar thread was still merrily churning away doing something (frustratingly, not printing a progress bar) when the main thread exited.

    Anything else I should be checking?
    Thanks
    Dan