-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split SampleQueue.advanceTo for advance & seek use cases
This method has two use cases: 1. Seeking. Calls are immediately preceded by a call to rewind(), and the returned value isn't important unless it's ADVANCED_FAILED (i.e. the caller is only interested in success and failure). 2. Advancing. The return value is important unless it's ADVANCED_FAILED, in which case the caller wants to treat it as 0. This change creates separate methods for each use case. The new seekTo methods automatically rewind and return a boolean. The updated advanceTo method returns 0 directly in cases where ADVANCED_FAILED was returned. Arguments that were always hard-coded to true by callers have also been removed. This change is a step toward one possible solution for #6155. How we'll solve that issue is still up for discussion, but this change seems like one we should make regardless! Issue: #6155 PiperOrigin-RevId: 290053743
- Loading branch information
Showing
5 changed files
with
146 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.