# Need help to understand the concpet thread#pending\_interrupt?

**URL:** <https://www.ruby-forum.com/t/need-help-to-understand-the-concpet-thread-pending-interrupt/228195>\
**Category:** Ruby\
**Created:** [April 12, 2013, 11:45pm UTC](https://www.ruby-forum.com/t/need-help-to-understand-the-concpet-thread-pending-interrupt/228195 "2013-04-12T23:45:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![my-ruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e95f7d/32.png) [@my-ruby](https://www.ruby-forum.com/u/my-ruby)\
**Post date:** [April 12, 2013, 11:45pm UTC](https://www.ruby-forum.com/t/need-help-to-understand-the-concpet-thread-pending-interrupt/228195/1 "2013-04-12T23:45:39Z")

</div>

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
