Hi,
I have a render thread that uses mutexes for accessing data modified in other threads (vertex buffers etc.). I assured that the operations the other threads perform while they have locked the mutexes are pretty short and therefore should not take longer than several microseconds. However, once or twice per second, the render thread has to wait for the mutexes for several milliseconds because they were not released soon enough. This causes stuttering in my game.
Is there a way to prevent that this happens? I already set the other threads' priorities to "idle" and the render thread's priority to "time critical". I tried to set processor affinities for the threads but that didn't help, too.
However, if I only start 3 instead of 12 (my processor's thread count) other threads, the stuttering disappears, but the world loads much slower...