Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/catboost/catboost
/ SetPromise
Function
SetPromise
library/cpp/threading/future/perf/main.cpp:18–22 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
16
17
template <typename T>
18
TPromise<T> SetPromise(T value) {
19
auto promise = NewPromise<T>();
20
promise.SetValue(value);
21
return promise;
22
}
23
24
template <typename T>
25
void TestSetPromise(const NBench::NCpu::TParams& iface, T value) {
Callers
2
DoExecute
Method · 0.85
TestSetPromise
Function · 0.85
Calls
1
SetValue
Method · 0.45
Tested by
1
TestSetPromise
Function · 0.68