Should I ( a ), make a small wrapper around vprintf that includes either a basic mutex/spinlock,
or
should I ( b ), attempt to create a moderately thread-safe buffering system with that wrapper to allow for fast additions of requests that will be printed sequentially with one instance of vprintf? Or something like that. a thread-safe buffering system?
Or whatever else you'd suggest?
Mangled text kind of screws things up. Lol. However, I'm not quite sure what locking method is the fastest in pthread-win32, spinlocks actually seem to take longer... but, I'll run some tests, I suppose.
Any opinion would be greatly appreciated
This post has been edited by novacrazy: 14 February 2012 - 10:55 PM

New Topic/Question
Reply




MultiQuote



|