Repo created
This commit is contained in:
parent
81b91f4139
commit
f8c34fa5ee
22732 changed files with 4815320 additions and 2 deletions
31
TMessagesProj/jni/voip/tgcalls/StaticThreads.h
Normal file
31
TMessagesProj/jni/voip/tgcalls/StaticThreads.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
namespace rtc {
|
||||
class Thread;
|
||||
}
|
||||
|
||||
namespace tgcalls {
|
||||
|
||||
class Threads {
|
||||
public:
|
||||
virtual ~Threads() = default;
|
||||
virtual rtc::Thread *getNetworkThread() = 0;
|
||||
virtual rtc::Thread *getMediaThread() = 0;
|
||||
virtual rtc::Thread *getWorkerThread() = 0;
|
||||
|
||||
// it is not possible to decrease pool size
|
||||
static void setPoolSize(size_t size);
|
||||
static std::shared_ptr<Threads> getThreads();
|
||||
};
|
||||
|
||||
namespace StaticThreads {
|
||||
rtc::Thread *getNetworkThread();
|
||||
rtc::Thread *getMediaThread();
|
||||
rtc::Thread *getWorkerThread();
|
||||
std::shared_ptr<Threads> &getThreads();
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue