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

Serialized @Background task cancellation bugfix #624

Merged
merged 1 commit into from Jun 10, 2013

Conversation

Projects
None yet
2 participants
@rom1v
Contributor

rom1v commented Jun 10, 2013

This pull request fix a bug found in my serial+cancellable tasks feature.

If a serialized @Background task was cancelled after it had been
submitted to the executor but before its run() method was called, then
the following tasks with the same serial identifier were not executed.

Issue reported here:
#579 (comment)

Detected by ThreadActivityTest#cancellableSerializedBackgroundTasks()
(but not always due to the race condition)

I ran the tests 50 times (in a loop):

  • 24 fails without this fix
  • 0 fails with this fix

Thank you to dhleong for reporting it so quickly after the merge.

Serialized @background task cancellation bugfix
If a serialized @background task was cancelled after it had been
submitted to the executor but before its run() method was called, then
the following tasks with the same serial identifier were not executed.

Issue reported here:
#579 (comment)

Detected by ThreadActivityTest#cancellableSerializedBackgroundTasks()
(but not always due to the race condition)
@DayS

This comment has been minimized.

Contributor

DayS commented Jun 10, 2013

My own tests works fine with this fix.

DayS added a commit that referenced this pull request Jun 10, 2013

@DayS DayS merged commit 7717644 into androidannotations:develop Jun 10, 2013

@DayS

This comment has been minimized.

Contributor

DayS commented Jun 10, 2013

Thanks for the quick fix 👍

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