Non-blocking resource manager

I am trying to manage a tracking motor where as well as accepting input for where to point it has to constantly be in a closed loop checking that is it in the right place. In trying to do this as a resource manager all examples I have found will only be running when handling a client call and spend the rest of the time blocked. Is there any way to provide simmiler functionality as dispatch_block() that will return the ocb of any pending events but wont block if there are none, instead just return a NULL.

Or should I be doing this with two processes where one handles the user input and sends a message to the second process which handles tracking the motor?

Any samples of code of resource managaers that are more complecated then the examples in “writing a resource manager” would also be helpful.

What you want to do is start a thread. Simply have the looping thread check a volatile variable to see if there is any pending configuration data. Then the main thread does the dispatch loop.