1 #ifndef ASYNC_PRINTER_H_
2 #define ASYNC_PRINTER_H_
8 #include "../Process/AsyncProcess.h"
10 #define ASYNC_PRINTLN(fmt, ...) \
11 AsyncPrinter::Printf(fmt ## " (%s, line %d)\n", ## __VA_ARGS__, __FILE__, __LINE__);
20 static void Initialize();
21 static void Finalize();
23 static int Printf(
const char* msg, ...);
24 static int Println(
const char* msg, ...);
25 static void DbgPrint(
const char* msg, ...);
27 static void RedirectToFile(
const char* file);
28 static void RestoreToConsole();
33 static const UINT32 kMaxQueueSize = 4096;
34 static const UINT32 kMaxPrintsPerCycle = 50;
44 queue<string> _messageQueue;
46 static bool filePrinting;