diff options
author | Chris Wren <cwren@android.com> | 2014-05-21 15:28:10 -0400 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2014-05-23 09:36:09 -0400 |
commit | 4ad99682dd726c6b5de9e9b34c0e8daaa52139ad (patch) | |
tree | 93f8d216effb5e30bcee9927b5d5677b2489a36a /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 7d66d76fbb97ce67e4c8112c4a515210bb3e3976 (diff) |
Fix a concurrency bug in the ranking reconsideration.
If we rely on mNotificationList to be sorted, then we cannot allow
records to change without a corresponding call to sort. Currently
RankingFuture may modify records in a separate thread, while the sort
doesn't happen until later. This creates a window for race conditions.
Instead, RankingFuture should record operations to be performed on the
record that will replayed later, in a transaction along with a sort.
We can't simply overwrite the old record completely because another
future may be concurrently modifying a different aspect of the record.
Two futures that attempt to modify the same aspect will be serialized
and the second will overwrite eventually the first.
Change-Id: I9223cabdc60f72d8e37e6d8119bea1e0127185c0
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions