Hi Markus,
It seems like you are looking for an interrupt (fast polling) of a sensor. If you have my book on Raspberry Pi, there is Example 19-1 and Example 22-2 which uses the GPIO.WiringPiISR interrupt. There is more data on priorities, interrupts and threads at: Interrupts that is helpful.
I found that WiringPiISR worked pretty good, and I was having trouble with resolution and interference below about 600 microseconds.