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.
semaphore: use functor as wait list expiry_handler
This allows us to instantiate a single ExceptionFactory - the semaphore's base-class, rather than two of them, one for the semaphore and one for the expiry_handler. With that. constructing the wait list becomes noexcept (based on std::function being nothrow move constructible) Note that theoretically, exception_factory::timeout() may throw. To simplify error handling in the expiry handler function, catch this exception and turn the error into a generic, non-throwing one and with that mark the returned function noexcept. Signed-off-by: Benny Halevy <[email protected]>
- Loading branch information
Showing
2 changed files
with
31 additions
and
9 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