MCPcopy Create free account
hub / github.com/catboost/catboost / AddFunc

Method AddFunc

util/thread/pool.h:173–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172 template <class T>
173 Y_WARN_UNUSED_RESULT bool AddFunc(T&& func) {
174 THolder<IObjectInQueue> wrapper(MakeThrFuncObj(std::forward<T>(func)));
175 bool added = Add(wrapper.Get());
176 if (added) {
177 Y_UNUSED(wrapper.Release());
178 }
179 return added;
180 }
181
182 bool AddAndOwn(THolder<IObjectInQueue> obj) Y_WARN_UNUSED_RESULT;
183 virtual void Start(size_t threadCount, size_t queueSizeLimit = 0) = 0;

Callers 1

Y_UNIT_TESTFunction · 0.80

Calls 5

MakeThrFuncObjFunction · 0.85
Y_UNUSEDFunction · 0.85
AddFunction · 0.50
GetMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected