mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 03:02:30 +00:00
Moved Thread header to torrent/system directory.
This commit is contained in:
@@ -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>()) {
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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); }
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user