Issue Details (XML | Word | Printable)

Key: TFJ-228
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Yusuke Yamamoto
Reporter: Steve Chui
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Twitter4J

Unable to "close" a TwitterStream

Created: 29/Oct/09 07:59 AM   Updated: 29/Oct/09 07:59 AM
Return to search
Component/s: Core
Affects Version/s: 2.0.9
Fix Version/s: None

Environment: Windows, java version "1.6.0_15".


 Description  « Hide
When trying to close a TwitterStream, the thread hangs at is.close() call inside StatusStream.close() function. This is because the thread that handles the reading is waiting for input from the BufferedReader.readLine() and this function is synchronized. So, if there is another thread tries to close this stream, it will hang by the synchronized method.
This is a known limitation on the old java io package. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4859836 and http://forums.sun.com/thread.jspa?threadID=632191
Please consider using the NIO package.

Sort Order: Ascending order - Click to sort in descending order
No changes have yet been made on this issue.