MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / threadEntry

Method threadEntry

src/output/StreamThreadBase.cpp:72–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70// =============================================================================
71
72void StreamThreadBase::threadEntry() {
73 StreamClient &client = _stream.getStreamClient(_clientID);
74 while (running()) {
75 switch (_state) {
76 case State::Pause:
77 _state = State::Paused;
78 break;
79 case State::Paused:
80 // Do nothing here, just wait
81 std::this_thread::sleep_for(std::chrono::milliseconds(50));
82 break;
83 case State::Running:
84 readDataFromInputDevice(client);
85 break;
86 default:
87 PERROR("Wrong State");
88 std::this_thread::sleep_for(std::chrono::milliseconds(50));
89 break;
90 }
91 }
92}
93
94// =========================================================================
95// -- Other member functions ----------------------------------------------

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected