Mac OS X bug fix for racing in the GUI interpreter thread.
The flush() method was not working properly on Mac OS X, so hopefully now it is thread-safe. There are conditions where it could fail though, and the current solution is a bit of a hack.
Authored by: bugman 2011-09-05
Parent: [r14582]
Child: [r14584]