Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Serialized @Background task cancellation bugfix#624

Merged
DayS merged 1 commit into
androidannotations:developandroidannotations/androidannotations:developfrom
rom1v:cancel_background_fixrom1v/androidannotations:cancel_background_fixCopy head branch name to clipboard
Jun 10, 2013
Merged

Serialized @Background task cancellation bugfix#624
DayS merged 1 commit into
androidannotations:developandroidannotations/androidannotations:developfrom
rom1v:cancel_background_fixrom1v/androidannotations:cancel_background_fixCopy head branch name to clipboard

Conversation

@rom1v

@rom1v rom1v commented Jun 10, 2013

Copy link
Copy Markdown
Contributor

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

DayS commented Jun 10, 2013

Copy link
Copy Markdown
Contributor

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

DayS commented Jun 10, 2013

Copy link
Copy Markdown
Contributor

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.