Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

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 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
Copy link
Contributor

DayS commented Jun 10, 2013

Thanks for the quick fix 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants