Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created February 22, 2013 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/239904adb0c4a8f71e92 to your computer and use it in GitHub Desktop.
Save rolfbjarne/239904adb0c4a8f71e92 to your computer and use it in GitHub Desktop.
void StartFlushing ()
{
new System.Threading.Thread (() => {
while (true) {
System.Threading.Thread.Sleep (1);
fflush (IntPtr.Zero);
}
}).Start ();
}
[DllImport ("libc")]
static extern void fflush (IntPtr file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment