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

Fix: multiple asyncGetEvents #128

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@kunall17
Collaborator

kunall17 commented Aug 15, 2016

This should fix #121

@smarx

This comment has been minimized.

smarx commented Aug 15, 2016

Automated message from Dropbox CLA bot

@kunall17, it looks like you've already signed the Dropbox CLA. Thanks!

@kunall17 kunall17 closed this Aug 15, 2016

@kunall17 kunall17 reopened this Aug 16, 2016

@kunall17

This comment has been minimized.

Collaborator

kunall17 commented Aug 16, 2016

To address this issue I dug this more, i found out while initiating a new AsyncGetEvents this while loop in the run() of the Thread was still running and hence this thread stayed in state of running and was not picked up by garbage collector, hence if we stop this infinite loop the thread would go into the state of stopped or death state and let garbage collector to do its work!
I tested the app several times, dumped the heap and did not notice any multiple getEvents!

@timabbott

This comment has been minimized.

Member

timabbott commented Aug 16, 2016

Awesome!

On Mon, Aug 15, 2016 at 10:24 PM, Kunal Gupta notifications@github.com
wrote:

To address this issue I dug this more, i found out while initiating a new
AsyncGetEvents
https://github.com/zulip/zulip-android/blob/master/app/src/main/java/com/zulip/android/activities/ZulipActivity.java#L1357
this while loop
https://github.com/zulip/zulip-android/blob/master/app/src/main/java/com/zulip/android/networking/AsyncGetEvents.java#L101
in the run() of the Thread was still running and hence this thread stayed
in state of running and was not picked up by garbage collector, hence if we
stop this infinite loop the thread would go into the state of stopped or
death state and let garbage collector to do its work!
I tested the app several times, dumped the heap and did not notice any
multiple getEvents!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#128 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACnm2pYSS30oEy5dIwzRzIYaKh1tNRnrks5qgUmXgaJpZM4JkKLi
.

@niftynei

This comment has been minimized.

Contributor

niftynei commented Aug 16, 2016

lgtm. thanks @kunall17.

@niftynei niftynei closed this Aug 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment