2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use limited number of threads in MTP.

This commit is contained in:
John Preston
2019-11-27 18:09:56 +03:00
parent c742d7406c
commit 64535251e8
4 changed files with 74 additions and 32 deletions

View File

@@ -138,6 +138,7 @@ public:
// Main thread.
Session(
not_null<Instance*> instance,
not_null<QThread*> thread,
ShiftedDcId shiftedDcId,
not_null<Dcenter*> dc);
~Session();
@@ -198,9 +199,7 @@ private:
const ShiftedDcId _shiftedDcId = 0;
const not_null<Dcenter*> _dc;
const std::shared_ptr<SessionData> _data;
std::unique_ptr<QThread> _thread;
std::vector<std::unique_ptr<QThread>> _destroyingThreads;
const not_null<QThread*> _thread;
Connection *_connection = nullptr;