aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/rain_check/test/helper/misc.cpp
blob: c0fcb272523c4f427b51a85b62a8cd1aa933d4f0 (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;
}