forked from ray-project/ray
-
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.
[serve] add blocking getter to messagequeue (ray-project#47764)
## Why are these changes needed? Add async `get_one_message` to `MessageQueue`, which is a blocking call. It will wait for either a new message, at which point it will return it, or if there are no more messages in the queue: - Raise `StopAsyncIteration` if the queue is closed - Raise error if `set_error` is called. Also add unit tests. Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
- Loading branch information
Showing
2 changed files
with
115 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