MCPcopy Create free account
hub / github.com/FastLED/FastLED / start

Method start

tests/fl/stl/asio/http/test_utils/server_thread.cpp.hpp:43–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool ServerThread::start() {
44 if (mData->mRunning.load()) {
45 return true;
46 }
47
48 if (!mData->mServer) {
49 return false;
50 }
51
52 mData->mRunning.store(true);
53 // Pass shared_ptr to data so the thread keeps it alive even if
54 // the ServerThread object is destroyed before join completes.
55 mData->mThread = fl::thread(serverThreadFunc, mData);
56
57 // Give the thread time to start
58 fl::this_thread::sleep_for(fl::chrono::milliseconds(100)); // ok sleep for
59
60 return true;
61}
62
63void ServerThread::stop() {
64 // Always set running to false and join, even if already false.

Callers 6

patch_platformio_iniFunction · 0.45
FL_TEST_FILEFunction · 0.45
mainFunction · 0.45
makeServerFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls 3

sleep_forFunction · 0.50
loadMethod · 0.45
storeMethod · 0.45

Tested by 1