forked from scylladb/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'semaphore: semaphore_units: return units when reassigned' from…
… Benny Halevy When semaphore_units are (move-) reassigned with other units, the held units aren't currently returned to the semaphore. This change implements the move-reassignment operator by swapping the semaphore and the units counter so that when the moved-from semaphore_units object is destroyed, the units will be returned to the semaphore via `~semaphore_units` -> `return_all`. Add a unit test reproducer. Fixes scylladb#1465 Signed-off-by: Benny Halevy <[email protected]> Closes scylladb#1466 * github.com:scylladb/seastar: semaphore: semaphore_units: return all units when reassigned semaphore_test: do not reassign units after they're destroyed
- Loading branch information
Showing
2 changed files
with
32 additions
and
8 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