|
co_usb
|
Service for handling libusb events. More...
#include <service.hpp>


Public Types | |
| using | handler_fn_t = void(*)(libusb_context *, std::stop_token) |
Public Member Functions | |
| handler_service (boost::capy::execution_context &ctx) | |
| template<std::invocable< libusb_context *, std::stop_token > HandlerFn> | |
| void | start_thread (std::shared_ptr< libusb_context > ctx, HandlerFn &&handler_fn) |
| Creates a default handler thread. | |
| std::stop_source | stop_source () |
| ~handler_service () override | |
| void | shutdown () override |
Service for handling libusb events.
creates a primitive libusb event handler thread. Said handler is guaranteed to NOT support multithreaded handling and must be assumed to be as primitive as humanly possible;
| using co_usb::detail::handler_service::handler_fn_t = void (*)(libusb_context *, std::stop_token) |
| co_usb::detail::handler_service::handler_service | ( | boost::capy::execution_context & | ctx | ) |
|
override |
|
override |
|
inline |
Creates a default handler thread.
Cannot be put into ctor because this must be optional and services cannot take additional ctor params.
| std::stop_source co_usb::detail::handler_service::stop_source | ( | ) |