How to eliminate Wait and While?

warren631:
I don't want it to wait (even a few milliseconds) for a servo to position or wait, for example, for a return echo on the sonic sensor because other important momentary inputs, such as counting encoder pulses, could be missed.

If you don't want to wait, don't. This may help a bit:

Interrupts have their uses, particularly for counting encoder pulses.