MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / TaskContainer

Method TaskContainer

mlx/data/core/ThreadPool.h:67–67  ·  view source on GitHub ↗

here, std::forward is needed because we need the construction of _f not to bind an lvalue reference - it is not a guarantee that an object of type F is CopyConstructible, only that it is MoveConstructible.

Source from the content-addressed store, hash-verified

65 // to bind an lvalue reference - it is not a guarantee that an object of
66 // type F is CopyConstructible, only that it is MoveConstructible.
67 TaskContainer(F&& func) : f_(std::forward<F>(func)) {}
68
69 void operator()() override {
70 f_();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected