Moved Thread header to torrent/system directory.

This commit is contained in:
Jari Sundell
2026-04-22 16:02:05 +02:00
committed by GitHub
parent a964b0a350
commit eb96876eb2
15 changed files with 29 additions and 29 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
namespace session {
SessionManager::SessionManager(torrent::utils::Thread* thread)
SessionManager::SessionManager(torrent::system::Thread* thread)
: m_thread(thread),
m_lockfile(std::make_unique<utils::Lockfile>()) {
}
+2 -2
View File
@@ -44,7 +44,7 @@ public:
constexpr static int max_concurrent_processing = 16;
constexpr static int max_cleanup_processing = 64;
SessionManager(torrent::utils::Thread* thread);
SessionManager(torrent::system::Thread* thread);
~SessionManager();
bool is_used() const;
@@ -89,7 +89,7 @@ private:
bool replace_save_request_unsafe(SaveRequest& download);
bool remove_completely_unsafe(core::Download* download, std::unique_lock<std::mutex>& lock);
torrent::utils::Thread* m_thread;
torrent::system::Thread* m_thread;
bool m_freeze_info{};
std::string m_path;
+2 -2
View File
@@ -74,8 +74,8 @@ ThreadSession::next_timeout() {
namespace session_thread {
torrent::utils::Thread* thread() { return session::ThreadSessionInternal::thread_session(); }
std::thread::id thread_id() { return session::ThreadSessionInternal::thread_session()->thread_id(); }
torrent::system::Thread* thread() { return session::ThreadSessionInternal::thread_session(); }
std::thread::id thread_id() { return session::ThreadSessionInternal::thread_session()->thread_id(); }
void callback(void* target, std::function<void ()>&& fn) { session::ThreadSessionInternal::thread_session()->callback(target, std::move(fn)); }
void cancel_callback(void* target) { session::ThreadSessionInternal::thread_session()->cancel_callback(target); }
+2 -2
View File
@@ -1,14 +1,14 @@
#ifndef RTORRENT_SESSION_THREAD_SESSION_H
#define RTORRENT_SESSION_THREAD_SESSION_H
#include <torrent/utils/thread.h>
#include <torrent/system/thread.h>
namespace session {
class SessionManager;
class ThreadSessionInternal;
class ThreadSession : public torrent::utils::Thread {
class ThreadSession : public torrent::system::Thread {
public:
static void create_thread();