mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
* Properly set ThreadMain::m_thread to pthread_self().
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1185 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -44,7 +44,7 @@ class SignalHandler {
|
||||
public:
|
||||
typedef sigc::slot0<void> Slot;
|
||||
|
||||
static const unsigned int HIGHEST_SIGNAL = 32;
|
||||
static const unsigned int HIGHEST_SIGNAL = SIGUSR2;
|
||||
|
||||
static void set_default(unsigned int signum);
|
||||
static void set_ignore(unsigned int signum);
|
||||
|
||||
@@ -112,6 +112,7 @@ ThreadBase::ThreadBase() :
|
||||
// Init the poll manager in a special init function called by the
|
||||
// thread itself. Need to be careful with what external stuff
|
||||
// create_poll_manager calls in that case.
|
||||
std::memset(&m_thread, 0, sizeof(pthread_t));
|
||||
|
||||
m_taskShutdown.set_slot(rak::ptr_fn(&throw_shutdown_exception));
|
||||
|
||||
|
||||
@@ -53,4 +53,5 @@ ThreadMain::init_thread() {
|
||||
m_pollManager->get_torrent_poll()->set_flags(torrent::Poll::flag_waive_global_lock);
|
||||
|
||||
m_state = STATE_INITIALIZED;
|
||||
m_thread = pthread_self();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user