mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 03:02:30 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c3c77a2b7 | |||
| 120fcb0273 | |||
| c36956813d | |||
| 05563b4c9b | |||
| a544f8ad68 | |||
| b35413ea71 | |||
| f9f19fb041 |
@@ -11,8 +11,7 @@ namespace input {
|
|||||||
|
|
||||||
void
|
void
|
||||||
InputEvent::insert() {
|
InputEvent::insert() {
|
||||||
torrent::this_thread::poll()->open(this);
|
torrent::this_thread::poll()->open_and_insert_read(this);
|
||||||
torrent::this_thread::poll()->insert_read(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+3
-2
@@ -112,8 +112,7 @@ main(int argc, char** argv) {
|
|||||||
|
|
||||||
torrent::log_initialize();
|
torrent::log_initialize();
|
||||||
|
|
||||||
// TODO: Create a fake thread object for initializing other processes and enabling logging.
|
torrent::runtime::initialize_worker_process_and_main_thread();
|
||||||
torrent::initialize_main_thread();
|
|
||||||
|
|
||||||
// Block SIGCHLD until all threads are created, then unblock on main-thread, to avoid SIGCHLD
|
// Block SIGCHLD until all threads are created, then unblock on main-thread, to avoid SIGCHLD
|
||||||
// interrupting other threads.
|
// interrupting other threads.
|
||||||
@@ -164,6 +163,8 @@ main(int argc, char** argv) {
|
|||||||
torrent::initialize();
|
torrent::initialize();
|
||||||
torrent::main_thread::set_client_callback(&client_perform);
|
torrent::main_thread::set_client_callback(&client_perform);
|
||||||
|
|
||||||
|
torrent::runtime::initialize_worker_process();
|
||||||
|
|
||||||
scgi::ThreadScgi::create_thread();
|
scgi::ThreadScgi::create_thread();
|
||||||
session::ThreadSession::create_thread();
|
session::ThreadSession::create_thread();
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -109,8 +109,7 @@ void
|
|||||||
SCgi::activate() {
|
SCgi::activate() {
|
||||||
assert(torrent::this_thread::thread() == scgi_thread::thread());
|
assert(torrent::this_thread::thread() == scgi_thread::thread());
|
||||||
|
|
||||||
torrent::this_thread::poll()->open(this);
|
torrent::this_thread::poll()->open_and_insert_read(this);
|
||||||
torrent::this_thread::poll()->insert_read(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This should close the fd to avoid reuse.
|
// TODO: This should close the fd to avoid reuse.
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ SCgiTask::open(SCgi* parent, int fd) {
|
|||||||
// m_trusted=false into the next reuse, given that the
|
// m_trusted=false into the next reuse, given that the
|
||||||
// UNTRUSTED_CONNECTION=0 parse branch is a no-op.
|
// UNTRUSTED_CONNECTION=0 parse branch is a no-op.
|
||||||
|
|
||||||
torrent::this_thread::poll()->open(this);
|
torrent::this_thread::poll()->open_and_insert_read(this);
|
||||||
torrent::this_thread::poll()->insert_read(this);
|
|
||||||
|
|
||||||
auto lock = std::lock_guard<std::mutex>(m_result_mutex);
|
auto lock = std::lock_guard<std::mutex>(m_result_mutex);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user