When is _input() executed?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By KamCe

I know that the Node._process() method runs whenever possible, while the Node._physics_process() method runs at regular intervals.
Suppose we are in the following scenario (where the red lines indicate when Node._process() is executed and the blue lines when Node._physics_process() is executed):

Imgur

My question is: if at time t1 user input arrives, when is Node._input() executed? at time t1? at time t2 or maybe at time t3?

:bust_in_silhouette: Reply From: NX7R

Node._process() run every frame not whenever possible
Node._process() and Node._physics_process() run on deffrent threads
but Node._process() CALLS whenever possible as delta < 0.02 ms
_input() virtual function calls when an inputevent pressed on the mainloop
after that Node._process() and Node._physics_process() will be able to know if the is an Inputevent thats mean :

_Input() -> _physics_process() -> _process()