Handler guard object to safely run and finish a stream handler.
More...
#include <cvb/async/multi_stream_handler.hpp>
Handler guard object to safely run and finish a stream handler.
This guard class provides a way to safely stop the stream when leaving the scope (e.g an exception occurs).
- Examples
- Cvb/QmlStreamDisplay, and Cvb/QtStreamDisplay.
◆ StreamHandlerGuard()
Creates a stream handler guard object.
- Parameters
-
[in] | streamHandler | Stream handler shared by the guard. |
[in] | autoRun | Run the stream handler if yes and not already running, otherwise do nothing. |
- Exceptions
-
Does | not throw any exception. |
◆ ~StreamHandlerGuard()
Finishes the shared stream handler .
- Exceptions
-
Does | not throw any exception. |
All errors occurred within the acquisition thread are shallowed.