mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
* Foundation for multi-threaded support.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1111 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -69,6 +69,8 @@
|
||||
#include "signal_handler.h"
|
||||
#include "option_parser.h"
|
||||
|
||||
#include "thread_worker.h"
|
||||
|
||||
void do_panic(int signum);
|
||||
void print_help();
|
||||
void initialize_commands();
|
||||
@@ -157,6 +159,9 @@ main(int argc, char** argv) {
|
||||
this_thread = new ThreadBase();
|
||||
this_thread->init_thread();
|
||||
|
||||
worker_thread = new ThreadWorker();
|
||||
worker_thread->init_thread();
|
||||
|
||||
srandom(cachedTime.usec());
|
||||
srand48(cachedTime.usec());
|
||||
|
||||
@@ -308,6 +313,8 @@ main(int argc, char** argv) {
|
||||
control->display()->adjust_layout();
|
||||
control->display()->receive_update();
|
||||
|
||||
worker_thread->start_thread();
|
||||
|
||||
while (!control->is_shutdown_completed()) {
|
||||
if (control->is_shutdown_received())
|
||||
control->handle_shutdown();
|
||||
|
||||
Reference in New Issue
Block a user