The synchronization between interrupt processing and tasks is delayed

Hi, everyone. I have a problem
When the signal is released in the interrupt handler function and the signal is received in a task with the highest priority, time statistics are added to both the interrupt handler function and the task. It is found that after the interrupt handler release signal is bright, the task receives the signal after 5~10ms. Why is that? How to solve it?

Did your ISR invoke the scheduler when it finished? Typically, ISR should end with a test of the task woken flag that might have been set by the FreeRTOS FromISR functions used, and if set call s yield from ISR function.

The exact functions depend on what processor you are using and the port files used.