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

Function Y_UNIT_TEST

library/cpp/threading/future/async_ut.cpp:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30Y_UNIT_TEST_SUITE(Async) {
31 Y_UNIT_TEST(ExtensionExample) {
32 TMySuperTaskQueue queue;
33 auto future = NThreading::Async([]() { return 5; }, queue);
34 future.Wait();
35 UNIT_ASSERT_VALUES_EQUAL(future.GetValue(), 5);
36 }
37
38 Y_UNIT_TEST(WorksWithIMtpQueue) {
39 auto queue = MakeHolder<TThreadPool>();

Callers

nothing calls this directly

Calls 6

CreateThreadPoolFunction · 0.85
MakeFutureFunction · 0.85
AsyncFunction · 0.70
WaitMethod · 0.45
GetValueMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected