FastLED 3.10.8
Loading...
Searching...
No Matches

◆ Handle() [4/4]

fl::task::Handle::Handle ( shared_ptr< ITaskImpl > impl)
explicit

Constructs a handle for an existing task implementation.

Parameters
implTask implementation. Ownership is shared: this handle, every copy of it, and the entry Scheduler::add_task keeps all hold the implementation alive, and it is destroyed when the last of them goes away. Passing nullptr yields an invalid handle that behaves exactly like a default-constructed one: is_valid() returns false, every accessor returns a default value, every mutator is a no-op, and the scheduler refuses to register it.
Note
This is public only because ITaskImpl is forward-declared.

Definition at line 273 of file task.cpp.hpp.

273: mImpl(fl::move(impl)) {}
shared_ptr< ITaskImpl > mImpl
Definition task.h:245
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:30

References fl::FL_NO_EXCEPT, mImpl, and fl::adl_barrier::move().

+ Here is the call graph for this function: