FastLED 3.9.15
Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/thread_config.h" // For FASTLED_MULTITHREADED
4
5// Include platform-specific thread implementation
6// FASTLED_MULTITHREADED is already defined by thread_config.h
7#include "platforms/thread.h" // IWYU pragma: keep
8
9// Define FASTLED_USE_THREAD_LOCAL based on FASTLED_MULTITHREADED
10#ifndef FASTLED_USE_THREAD_LOCAL
11#define FASTLED_USE_THREAD_LOCAL FASTLED_MULTITHREADED
12#endif // FASTLED_USE_THREAD_LOCAL
13
14namespace fl {
15
16// Bind platform implementations to fl:: namespace
17
31using thread = fl::platforms::thread;
32
34using thread_id = fl::platforms::thread_id;
35
37namespace this_thread {
38 using fl::platforms::this_thread::get_id; // ok bare using
39 using fl::platforms::this_thread::yield; // ok bare using
40 using fl::platforms::this_thread::sleep_for; // ok bare using
41 using fl::platforms::this_thread::sleep_until; // ok bare using
42} // namespace this_thread
43
44} // namespace fl
this_thread namespace for thread-specific operations
Definition thread.h:37
fl::platforms::thread thread
Thread abstraction for FastLED.
Definition thread.h:31
fl::platforms::thread_id thread_id
Thread ID type.
Definition thread.h:34
Base definition for an LED controller.
Definition crgb.hpp:179
Platform detection for FASTLED_MULTITHREADED macro.