mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-23 06:50:36 +01:00
33 lines
687 B
C++
33 lines
687 B
C++
#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;
|
|
virtual rtc::Thread *getProcessThread() = 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();
|
|
rtc::Thread *getProcessThread();
|
|
std::shared_ptr<Threads> &getThreads();
|
|
}
|
|
|
|
};
|