Raspberry Pi Daily update ⋅ June 9, 2019 NEWS
That’s exactly what interrupts do. In python there is a function RPi.GPIO.add_event_detect( GPIO_NUMBER, GPIO.RISING, callback=yourCallback) .
Separate SPI data
Any answer might only be of limited help to you as long as you have not understood how SPI actually works, so you should take a detailed look at this …