Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added checking the "stop" flag between subsequent "readLine" calls. #59

Closed
wants to merge 1 commit into from

Conversation

bwilk
Copy link

@bwilk bwilk commented Apr 14, 2016

The problem I am trying to address, is waiting forever for the "readNextRow" method to return. when there is no change in the database.

I have added checking the "stop" flag between subsequent "readLine" calls. I have also added checking "Thread.interrupted" in order to allow for graceful termination when the thread is interrupted.

As the "readLine" method is blocking and takes quite long time to return, it may be also valuable to close underlying stream in "stop" method, which enables another thread to call it, in order to make it returning immediately.

…Added checking "Thread.interrupted" in order to allow for graceful termination when the thread is interrupted.
@bwilk bwilk changed the title Added checking the "stop" flag between ssubsequent "readLine" calls. Added checking the "stop" flag between subsequent "readLine" calls. Apr 14, 2016
@bwilk bwilk closed this Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant