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

Serialized @Background task cancellation bugfix #624

Merged
merged 1 commit into from Jun 10, 2013

Conversation

@rom1v
Copy link
Contributor

@rom1v 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.

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:
androidannotations#579 (comment)

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

@DayS DayS commented Jun 10, 2013

My own tests works fine with this fix.

DayS added a commit that referenced this issue Jun 10, 2013
@DayS DayS merged commit 7717644 into androidannotations:develop Jun 10, 2013
@DayS
Copy link
Contributor

@DayS 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants