aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/rain_check/test/helper/misc.cpp
blob: 0fe3700b96f9b54231b7e379cbbca068177686a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "misc.h" 
 
#include <util/system/yassert.h>

using namespace NRainCheck;

void TSpawnNopTasksCoroTask::Run() {
    Y_VERIFY(Count <= Completion.size());
    for (unsigned i = 0; i < Count; ++i) {
        SpawnSubtask<TNopCoroTask>(Env, &Completion[i], "");
    }

    WaitForSubtasks();
}

TContinueFunc TSpawnNopTasksSimpleTask::Start() {
    Y_VERIFY(Count <= Completion.size());
    for (unsigned i = 0; i < Count; ++i) {
        SpawnSubtask<TNopSimpleTask>(Env, &Completion[i], "");
    }

    return &TSpawnNopTasksSimpleTask::Join;
}

TContinueFunc TSpawnNopTasksSimpleTask::Join() {
    return nullptr;
}