[Feature] Fully-featured server stop functionality #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This feature implements the server stop functionality during a
KeyboardInterrupt
in different scenarios.Although
pipeline_manager.stop()
seems to be invoked ins2s_pipeline.py
during aKeyboardInterrupt
, it is observed that in practice stop functionality is unresponsive. Ideally, stop functionality should work in both of the following scenarios (currently not the case):start server -> stop server
start server -> start client -> stop server
The present approach benefits the application in several aspects:
Tested for for both
--device cpu
andcuda
. Fixes #139 and fixes #140 .Logs
The logs below demonstrate the output of the server for both scenario 1 and scenario 2 after the fix was applied.
Scenario 1
Click to show log
Scenario 2
Click to show log