Timing in Threading while using mutex

Hi, I'm working on a project where we have a camera that determines the positions of objects on a board and then we move these objects with DC-motors controlled by a C++-package. The motors need to get an input 30 times/s but in the mean time the moves are computed by other threads. Atm I have a mutex that locks the other threads while the motor thread executes. Is there a way to force the other threads to hand over excecution to the motor thread 30 times/s? Atm I have a problem with it as the other threads often take longer time to excecute and therefore doesn't always give over execution in time.

Thanks
Martin
Topic archived. No new replies allowed.