# \[Ruby 1.9 - Bug #21\] (Assigned) should terminate @receiver\_thread of Net::IMAP safely

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-bug-21-assigned-should-terminate-receiver-thread-of-net-imap-safely/138935>\
**Category:** Development\
**Created:** [May 29, 2008, 4:31am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-21-assigned-should-terminate-receiver-thread-of-net-imap-safely/138935 "2008-05-29T04:31:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 29, 2008, 4:31am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-21-assigned-should-terminate-receiver-thread-of-net-imap-safely/138935/1 "2008-05-29T04:31:24Z")

</div>

Issue #21 has been reported by Shugo M…

* * *

Bug #21: should terminate @receiver\_thread of Net::IMAP safely  
[http://redmine.ruby-lang.org/issues/show/21](http://redmine.ruby-lang.org/issues/show/21)

Author: Shugo M.  
Status: Assigned  
Priority: Normal  
Assigned to: Shugo M.  
Category:  
Target version:

@receiver\_thread of Net::IMAP may be terminated by exception,  
and this causes the process termination if Thread.abort\_on\_exception is  
true.

Then Net::IMAP#disconnect does not call @receiver\_thread.join if  
TCPSocket#close  
raises an exception.

Reported by Tanaka A. in [ruby-dev:34821].

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [April 21, 2010, 3:09pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-21-assigned-should-terminate-receiver-thread-of-net-imap-safely/138935/2 "2010-04-21T15:09:07Z")

</div>

e$B%A%1%C%He(B #21 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B%+%F%4%je(B libe$B$K%;%C%He(B  
Target version 1.9.xe$B$+$ie(B1.9.2e$B$KJQ99e(B  
ruby -v -e$B$K%;%C%He(B

Hi, Shugo

Is this issue still unsolved?

## – Yusuke E. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

[http://redmine.ruby-lang.org/issues/show/21](http://redmine.ruby-lang.org/issues/show/21)

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 9, 2010, 1:29am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-21-assigned-should-terminate-receiver-thread-of-net-imap-safely/138935/3 "2010-05-09T01:29:05Z")

</div>

e$B%A%1%C%He(B #21 e$B$,99?7$5$l$^$7$?!#e(B (by Shugo M.)

e$B%9%F!\<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B  
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r27690.  
Shugo, thank you for reporting this issue.  
Your contribution to Ruby is greatly appreciated.  
May Ruby be with you.

* * *

[http://redmine.ruby-lang.org/issues/show/21](http://redmine.ruby-lang.org/issues/show/21)
