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

Method SafeAddAndOwn

util/thread/pool.cpp:682–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680}
681
682void IThreadPool::SafeAddAndOwn(THolder<IObjectInQueue> obj) {
683 Y_ENSURE_EX(AddAndOwn(std::move(obj)), TThreadPoolException() << TStringBuf("can not add to queue and own"));
684}
685
686bool IThreadPool::AddAndOwn(THolder<IObjectInQueue> obj) {
687 auto owner = MakeHolder<TOwnedObjectInQueue>(std::move(obj));

Callers 1

Y_UNIT_TESTFunction · 0.80

Calls 2

moveFunction · 0.50

Tested by

no test coverage detected