MCPcopy Create free account
hub / github.com/PHZ76/RtspServer / GetTaskScheduler

Method GetTaskScheduler

src/net/EventLoop.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33std::shared_ptr<TaskScheduler> EventLoop::GetTaskScheduler()
34{
35 std::lock_guard<std::mutex> locker(mutex_);
36 if (task_schedulers_.size() == 1) {
37 return task_schedulers_.at(0);
38 }
39 else {
40 auto task_scheduler = task_schedulers_.at(index_);
41 index_++;
42 if (index_ >= task_schedulers_.size()) {
43 index_ = 1;
44 }
45 return task_scheduler;
46 }
47
48 return nullptr;
49}
50
51void EventLoop::Loop()
52{

Callers 2

TcpServerMethod · 0.45
OnConnectMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected