Need help to understand the concpet thread#pending_interrupt?

pending_interrupt?(error = nil) → true/false

-> Returns whether or not the asynchronous queue is empty.

-> Since ::handle_interrupt can be used to defer asynchronous events.
This method can be used to determine if there are any deferred events.

-> If you find this method returns true, then you may finish :never
blocks.

The doc also has an example. But I didn’t understand. So requesting you
can you give me a simple example to understand the above 3 lines?

What is pending_interrupt? ?

Thanks