On Tue, Dec 14, 2010 at 23:45, Michael Menegakis <[email protected]> wrote: > It's not easy to make something on ioquake3 thread safe. e.g. Whenever > i want to print something from it I completely avoid Com_Printf (since > it's massively thread unsafe recursively) and only write on a mutex > protected 'to print' variable.
Pro tip: have your worker thread put strings in a mutex-protected circular buffer or linked list and let the main thread print them. Ideally, worker threads only process data and leave it to the main thread to interpret the results (translation vs printing in this case). _______________________________________________ ioquake3 mailing list [email protected] http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org By sending this message I agree to love ioquake3 and libsdl.
