mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-09 23:59:22 +00:00
Use separate thread for saving session data.
This commit is contained in:
+26
-2
@@ -1,14 +1,38 @@
|
||||
#ifndef TORRENT_GLOBALS_H
|
||||
#define TORRENT_GLOBALS_H
|
||||
|
||||
#include "thread_worker.h"
|
||||
#include <torrent/common.h>
|
||||
|
||||
#include "rpc/ip_table_list.h"
|
||||
|
||||
class Control;
|
||||
class ThreadWorker;
|
||||
|
||||
extern rpc::ip_table_list ip_tables;
|
||||
extern rpc::ip_table_list ip_tables;
|
||||
|
||||
extern Control* control;
|
||||
|
||||
// TODO: Update to new thread model.
|
||||
extern ThreadWorker* worker_thread;
|
||||
|
||||
namespace session {
|
||||
|
||||
class SessionManager;
|
||||
|
||||
} // namespace session
|
||||
|
||||
|
||||
namespace session_thread {
|
||||
|
||||
torrent::utils::Thread* thread();
|
||||
std::thread::id thread_id();
|
||||
|
||||
void callback(void* target, std::function<void ()>&& fn);
|
||||
void cancel_callback(void* target);
|
||||
void cancel_callback_and_wait(void* target);
|
||||
|
||||
session::SessionManager* manager();
|
||||
|
||||
} // namespace torrent::session_thread
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user