misc.cpp 633 B

123456789101112131415161718192021222324252627
  1. #include "misc.h"
  2. #include <util/system/yassert.h>
  3. using namespace NRainCheck;
  4. void TSpawnNopTasksCoroTask::Run() {
  5. Y_ABORT_UNLESS(Count <= Completion.size());
  6. for (unsigned i = 0; i < Count; ++i) {
  7. SpawnSubtask<TNopCoroTask>(Env, &Completion[i], "");
  8. }
  9. WaitForSubtasks();
  10. }
  11. TContinueFunc TSpawnNopTasksSimpleTask::Start() {
  12. Y_ABORT_UNLESS(Count <= Completion.size());
  13. for (unsigned i = 0; i < Count; ++i) {
  14. SpawnSubtask<TNopSimpleTask>(Env, &Completion[i], "");
  15. }
  16. return &TSpawnNopTasksSimpleTask::Join;
  17. }
  18. TContinueFunc TSpawnNopTasksSimpleTask::Join() {
  19. return nullptr;
  20. }