You have several choices:
- Use sleep() to force the process to suspend periodically and allow other process to use the CPU
- Run at a lower priority level - which will cause the OS to assign less CPU time
- Use a mutex or other synchronization object to detect when work is available - which will keep the process from consuming any CPU time unless it is actually doing work
- If you get work faster than you can process it - you may still need to use some sort of sleep/priority model to avoid completely consuming the CPU.
Option #2 can be tricky to do in a platform/OS neutral manner. Your best bet is to launch the process and change its priority in the runtime environment.